Python ubuntu virtualenv & # 8594; mistake

Beginner, be kind.

The other day I’m all:

sudo apt-get install python-virtualenv 

And then I (the following instructions):

 virtualenv env 

And Ubuntu 10.10 looks like this:

 Traceback (most recent call last): File "/usr/local/bin/virtualenv", line 5, in <module> from pkg_resources import load_entry_point File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2675, in <module> parse_requirements(__requires__), Environment() File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 552, in resolve raise DistributionNotFound(req) pkg_resources.DistributionNotFound: virtualenv==1.5.1 

What gives?

+8
python ubuntu virtualenv
source share
2 answers

The python-virtualenv package should install virtualenv in /usr/bin/ .

Instead, the trace error message says that you are using /usr/local/bin/virtualenv . Perhaps uninstall the /usr/local version of virtualenv and try again.

+6
source share

There was the same problem after upgrading to Ubuntu 11.04 ..

Turns out it was only because apt installed python-virtualenv 1.4, which was too old.

I uninstalled the deb package and used pip install and it worked fine.

 pip install virtualenv 
+7
source share

All Articles