Trying to create a virtualenv using the command:
mkvirtualenv -p /usr/local/lib/python3.2 splinter
Gives me the response:
Running virtualenv with interpreter /usr/local/lib/python3.2
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.2/dist-packages/virtualenv.py", line 784, in main
popen = subprocess.Popen([interpreter, file] + sys.argv[1:], env=env)
File "/usr/lib/python3.2/subprocess.py", line 745, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.2/subprocess.py", line 1361, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 13] Permission denied
How oh how can I start a virtualenv using python3.2?
You need to supply the path to the path to the Python interpreter with -p
, not the lib
directory.
Because you're passing that directory, virtualenv is trying to execute it, and therefore you get Permission denied
. So use the path to the python
executable in the bin
directory instead (use which python3.2
to find out if you don't know the location).
This should work, assuming your Python 3.2 interpreter can be found at /usr/local/bin/python3.2
:
mkvirtualenv -p /usr/local/bin/python3.2 splinter
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.