Cannot import packages installed in new Conda environment

佐手、 提交于 2019-12-03 15:06:05

I was trying to solve a similar issue and solved this through virtualenv rather than using a conda environment. I believe there is a conflict between Anaconda and your machine in that both think they are controlling your new environment which setting up a new environment in virtualenv seemed to fix.

If it's helpful, here's how to set up an environment using virtualenv. Create a location for your new environment if you don't have one already:

mkdir ~/virtualenvironment

Set up your virtual environment:

virtualenv ~/virtualenvironment/niml/ --python=python3.6.5

Activate your environment:

source bin/activate

Make sure that you've installed whatever packages you need:

pip install luigi

Check that the package imports properly in python:

python
import luigi

To deactivate:

source deactivate
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!