The Current problem I am looking into is described below:
My computer is Win10, I installed only one anaconda 3.5.3 on it. Using where python there is only one python in my computer.
I downloaded a rpy2python wheel file from the uefi website, and install that using pip install.
When I import rpy2 in C disk, it is already fine, import rpy2,import rpy2.robjects are all OK.
But when I import rpy2 in my own project, I can only first import rpy2, when I import rpy2.robjects,the program says can not find rpy2 module.
Finally I found the problem is that in my project, I occasionaly established an rpy2.py file, when I first import rpy2, it where automatically create an rpy2.pycache folder, secondly when I import rpy2.robjects, Of Course the computer can not find an rpy2.robjects.
Just Keep a track of my problem.
You'll want to check the Python documentation about import rules for modules. By default, having a file called rpy2.py in the working directory for your Python code will cause import rpy2 to find this one rather that the rpy2 package.
The easiest fix is probably to rename your module rpy2.py into something else.
import rpy2 but can not import rpy2.robjects when changing start folders