简体   繁体   English

linux + virtualenv + pip使用一些系统包

[英]linux + virtualenv + pip using some system packages

I would like to reuse certain packages installed systemwide, while ignoring all others. 我想重用系统安装的某些软件包,而忽略所有其他软件包。

I created mkvirtualenv --distribute --extra-search-dir=/usr/lib/python2.7/dist-packages/IPython myenv (defaulting to --no-system-packages , but pip freeze has no knowledge of ipython package. 我创建了mkvirtualenv --distribute --extra-search-dir=/usr/lib/python2.7/dist-packages/IPython myenv (默认为--no-system-packages ,但pip freeze不知道ipython包。

Is there a way to pickup certain packages already installed system wide ( ipython , numpy , etc)? 有没有办法拾取已安装在系统范围内的某些软件包( ipythonnumpy等)?

Thanks 谢谢

Not entirely what you are looking for, but you can create a custom bootstrap script like this: 不完全是您正在寻找的,但您可以创建这样的自定义引导脚本:

http://www.virtualenv.org/en/latest/index.html#creating-your-own-bootstrap-scripts http://www.virtualenv.org/en/latest/index.html#creating-your-own-bootstrap-scripts

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM