Conda list shows a package but cannot import it

前端 未结 7 1708
野趣味
野趣味 2021-01-01 16:22

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         


        
7条回答
  •  清酒与你
    2021-01-01 17:18

    I unfortunately don't have a "Do exactly this to fix your problem" solution but I would suggest the following steps. Many seem obvious but I find when sorting these sorts of problems out you have to be certain of each step before moving on.

    1. Does the host system, in this case your Ubuntu VM, have multiple versions of python installed? Are you sure you are using the version you think you're using? Did you check your path variable? You need to be sure you're using your conda installation.
    2. Does the host system have different versions of conda installed?
    3. It looks like in the activated environment you checked the package is listed in conda. But is it in the package directory for your virtual environment? One way to check this is to use the find command and specify the base path for your virtual environment.
    4. Try forcing the reinstallation of the package.
    5. Try using pip instead of conda. If your environment is setup properly pip should install packages to the conda path.

    more desperate steps

    1. Make a new virtual environment. Add packages one by one. Examine what each package is changing.
    2. Reinstall conda.
    3. Create a new instance of your vm.
    4. Make a vm instance from a different image.
    5. Make your own image.

    This is just one way to troubleshoot the problem. When possible try to avoid steps 6-10 because they're rather involved. That said sometimes it's a problem with the vm and not with you.

提交回复
热议问题