我在虚拟环境中运行python3,但是当我尝试导入新安装的软件包时,我收到ImportError: No module named ...
错误消息,尽管我在运行!env/bin/pip3 list
时看到了该软件包。
当我输入sys.path
时,我看不到任何通往我的virtualenv的路径:
['',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python35.zip',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/plat-darwin',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload',
'/Users/zurfarosa/Library/Python/3.5/lib/python/site-packages',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/IPython/extensions',
'/Users/zurfarosa/.ipython',
'/Users/zurfarosa']
如何将我的虚拟环境添加到我的PYTHONPATH?