I encountered this issue in my conda environment. The reason is that packages have been installed into two different folders, only one of which is recognised by the Python executable.
~/anaconda2/envs/[my_env]/site-packages
~/anaconda2/envs/[my_env]/lib/python2.7/site-packages
A proved solution is to add both folders to python path, using the following steps in command line (Please replace [my_env] with your own environment):
- conda activate [my_env].
- conda-develop ~/anaconda2/envs/[my_env]/site-packages
- conda-develop ~/anaconda2/envs/[my_env]/lib/python2.7/site-packages
(conda-develop is to add a .pth file to the folder so that the Python executable knows of this folder when searching for packages.)
To ensure this works, try to activate Python in this environment, and import the package that was not found.