Issue
I'm trying to figure out why I cannot create a virtualenv on RedHat. Here's my command line :
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
But I get the following :
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
Do you have any idea? Thanks
Solution
-p expects a python executable, not an installation directory. Give it the name of a python executable in your $PATH or the full path the the python executable you want to run.
Answered By - user615501