0
$ virtualenv --no-site-packages myenv
The --no-site-packages flag is deprecated; it is now the default behavior.
Traceback (most recent call last):
 File "/usr/local/bin/virtualenv", line 8, in <module>
 load_entry_point('virtualenv==1.7.1.2', 'console_scripts', 'virtualenv')()
 File "/usr/local/lib/python2.7/dist-packages/virtualenv-1.7.1.2-py2.7.egg/virtualenv.py", line 928, in main
 never_download=options.never_download)
 File "/usr/local/lib/python2.7/dist-packages/virtualenv-1.7.1.2-py2.7.egg/virtualenv.py", line 1029, in create_environment
 site_packages=site_packages, clear=clear))
 File "/usr/local/lib/python2.7/dist-packages/virtualenv-1.7.1.2-py2.7.egg/virtualenv.py", line 1154, in install_python
 mkdir(lib_dir)
 File "/usr/local/lib/python2.7/dist-packages/virtualenv-1.7.1.2-py2.7.egg/virtualenv.py", line 399, in mkdir
 os.makedirs(path)
 File "/usr/lib/python2.7/os.py", line 150, in makedirs
 makedirs(head, mode)
 File "/usr/lib/python2.7/os.py", line 150, in makedirs
 makedirs(head, mode)
 File "/usr/lib/python2.7/os.py", line 157, in makedirs
 mkdir(name, mode)
OSError: [Errno 13] Permission denied: 'myenv'

I have been struggling to figure out how to be able to get virtualenv to make a new environment without sudo.

SingleNegationElimination
157k35 gold badges270 silver badges306 bronze badges
asked Apr 2, 2012 at 3:27
1
  • Can you normally create a directory called myenv from the directory you are currently in? Is it possible there is already a file there, or are you running someplace other than your account home directory? Commented Apr 2, 2012 at 3:31

1 Answer 1

5

It looks like you're trying to create your environment in a location that you don't have permission to. Where are you attempting to create the environment? If you're doing this in a shared hosting environment, you want to create your virtualenv in your home directory.

Alternatively, use virtualenvwrapper, and that should take care of most of the decisions you need to make (like where to store your envs).

answered Apr 2, 2012 at 3:35
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.