Modifying a virtualenv so that packages installed in global site-packages are available [duplicate]

狂风中的少年 提交于 2019-11-30 03:29:09
Pedro Romano

This question is a partial duplicate of: Revert the `--no-site-packages` option with virtualenv

However since this question specifically mentions virtualenvwrapper, the simplest solution when using virtualenvwrapper is to simply use its toggleglobalsitepackages command:

$ toggleglobalsitepackages env1

Alternatively you can reinstall the virtualenv, reconfiguring it to have access to global packages, while keeping the packages already installed there with the command:

$ mkvirtualenv --system-site-packages env1

(thanks to @Adaephon for the heads up regarding toggleglobalsitepackages)

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