Here an issue i\'m having on a conda Virtual env. I\'m using ubuntu 64b guest on windows 7 host with Virtual Box.
So when i\'m doing :
source activat
Seems to be deps related issue see here github , So maybe You should ensure that Anaconda is up-to-date so that you are working with all the latest package releases. To do this, you should first update the conda utility run : conda update conda
, When prompted to do so, type y to proceed with the update. After that update anaconda also run : conda update anaconda
Again when prompted to do so, type y to proceed , after updates finished open new terminal and verify : conda --version
and : python --version
now try reinstalling visdom :conda install -n universe visdom --force-reinstall
or just update all packages : conda install -n universe --update-all
.
Check the files installed for the package as per List installed files of a package? and compare the list with your sys.path
.
For visdom
specifically, looking at the contents of the available Linux tarball, I see that it contains paths like lib/python3.6/site-packages
-- i.e. it's for Python 3.6 while your Python is 3.5.
A couple possibilities occur to me:
Your python
command might refer to a different python than the python
which is in your active conda environment folder. Check this by running in terminal which conda
and which python
. If you get something like the below, you're good here.
/anaconda3/bin/conda
/anaconda3/envs/<yourEnvName>/bin/python
If you are getting different paths, it is possible your path is messed up. open up your .bashrc
file and double check lines associated with python
and conda
.
Alternatively, reinstall conda.
You might have a version/dependency incompatibility issue. This seems unlikely to me as visdom
is compatible with python 2.7
onward (I think) and you clearly are using python 3.5.2
. Nonetheless, this might happen if you are using multiple package managers. Nowadays it is less common, but it does happen occasionally. Try checking this by running pip show visdom
and/or conda search --reverse-dependency visdom
or the equivalent for your package manager.
If this is indeed a problem, then I suggest first updating your packages and if that does not work then uninstalling visdom with the original package manager and trying to install with a different package manager.
If all of the above fails, start exploring your problem from a new environment. Can you replicate it in the new environment? (I can't). Can you replicate it on another machine? etc...
Keep the internets updated with your problem as we might be able to help some others out!
Realize this is a very old question but the same thing just happened to me after doing a conda update conda on my base environment on OSX and the package was numpy. Showed in conda list but could not be imported. What I did, which fixed it:
conda activate base
conda remove numpy
conda install numpy
This fixed things.
I meet the same problem, and tried all the given solutions to solve this problem, they didn't work for me.
Finally I just add the package installed directory to sys.path:
import sys
sys.path.apend('/Users/eng/anaconda3/envs/paddle/lib/python2.7/site-packages')
it workded.
It might be an issue with file system permissions. This could happen if you have installed the package while under root
. Try to run
sudo chmod -R a+rX /home/deeplearning/anaconda3/envs/
Drop the sudo
if you are root
in your VM terminal.