Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to run virtual env and all the documentation says I don't need to run it as root (and probably shouldn't). If I run it as root, everything works. If I run it without root, I get:

[stats@crunch ~]$ virtualenv env
Traceback (most recent call last):
  File "/usr/bin/virtualenv", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.6/site-packages/", line 2655, in <module>
  File "/usr/lib/python2.6/site-packages/", line 648, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/site-packages/", line 546, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: virtualenv==

I believe I can change the ownership and it's the same difference, but I'd like to know why this is happening. It's a fresh CentOS 6.2 installation.

share|improve this question

easy_install had installed virtualenv without read permissions for group or world (only execute). Any idea why that happens?

Doing chmod -R 755 on the /usr/lib/python/site-packages/virtualenv directory resolved the issue.

share|improve this answer

See this answer on stack overflow, you probably need to look at environmental variables and write permissions.

share|improve this answer

I had exactly the same error msg. You have to create "env" directory before executing virtualenv

mkdir env
virtualenv env
share|improve this answer
You should not have to pre-create the directory used by virtualenv. The need to do so indicates that something is wrong with your installation. – larsks Aug 13 '12 at 1:25
I wish someone could come up with a perfect solution. At the moment, this works for me. – Xiong Aug 13 '12 at 15:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.