【发布时间】:2016-05-30 16:56:30
【问题描述】:
我试图弄清楚为什么我不能在 RedHat 上创建 virtualenv。这是我的命令行:
python /opt/rh/python27/root/usr/bin/virtualenv-2.7 -p /opt/rh/python27/ /home/myuser/tpa/
.
/opt/rh/python27/root/usr/bin/virtualenv-2.7 : Is here to setup the version of virtualenv that I want to use
-p /opt/rh/python27/ : To setup the version of python I want to use
/home/myuser/tpa/ : My directory where the virtualenv will be stored
但我得到以下信息:
Traceback (most recent call last):
File "/opt/rh/python27/root/usr/bin/virtualenv-2.7", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 2603, in <module>
File "/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 666, in require
File "/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 565, in resolve
pkg_resources.DistributionNotFound: virtualenv==1.10.1
你有什么想法吗? 谢谢
【问题讨论】:
-
你应该在 -p 选项之后精确一个 python 可执行路径,而不是一个目录。例如:/usr/bin/python
标签: python virtualenv redhat fedora