"OSError: [Errno 13] Permission denied" error
19,711
You have not specified the Python interpreter to use to create your virtual environment in ~/Public/Programming/project1/
directory.
From man virtualenv
:
-p PYTHON_EXE,--python=PYTHON_EXE
The Python interpreter to use to create the new environment.
The -p
option expects the next argument to be the python interpreter on which the new environment would be based. But you missed that argument and virtualenv
thinks you want to base your environment on ~/Public/Programming/project1/
interpreter. But there is no interpreter available there, and hence you get that OSError
.
If you want to use Python 2.7, the correct command would be:
virtualenv -p python2.7 ~/Public/Programming/project1/
and for Python 3.4, it would be:
virtualenv -p python3.4 ~/Public/Programming/project1/
Related videos on Youtube
Comments
-
Alireza Ghaffari over 1 year
I am trying to create a virtualenv environment but I am encountered by this error:
user@mylaptop:~$ virtualenv -p ~/Public/Programming/project1/ Running virtualenv with interpreter /home/user/Public/Programming/Project1/ Traceback (most recent call last): File "/usr/local/bin/virtualenv", line 9, in <module> load_entry_point('virtualenv==12.0.6', 'console_scripts', 'virtualenv')() File "/usr/local/lib/python2.7/dist-packages/virtualenv.py", line 784, in main popen = subprocess.Popen([interpreter, file] + sys.argv[1:], env=env) File "/usr/lib/python2.7/subprocess.py", line 710, in __init__ errread, errwrite) File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child raise child_exception OSError: [Errno 13] Permission denied
What should I do?