Virtualenv 不适用于 RedHat

Virtualenv doesn't work on RedHat

我想弄清楚为什么我不能在 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 可执行文件,而不是安装目录。在你的 $PATH 中给它一个 python 可执行文件的名称或者你想要 运行.

的 python 可执行文件的完整路径