0

System used= ubuntu 14.04 , python = 2.7.6 . I'm trying to setup virtualenvironment using virtualenv to setup django1.8 . I installed pip and virtualenv using below commands

apt-get install python-pip
pip install virtualenv
pip install virtualenvwrapper

when I try to create "Virtual Environment" I get below error

root@linux:~#virtualenv test11
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.7/dist-packages/pkg_resources.py", line 2749, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 446, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 459, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 628, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: virtualenv==1.11.4

Any Suggestions?

2 Answers 2

1

well i switched to centos7 and got my django1.8 working with below commands

yum install gcc libffi-devel python-devel openssl-devel
yum install python-devel
yum group install "Development Tools"
yum install python-pip
pip install virtualenv
pip install virtualenvwrapper
pip install requests[security]

cd /var/www/html/project1
virtualenv .
pip install django==1.8
0

I recommend installing virtualenv as a system package:

apt-get install python-virtualenv

In your case you're installing virtualenv with pip and then creating the virtualenv, which doesn't make so much sense to me as pip should be used once you have your virtualenv, so any installed package stays "local" to the virtualenv.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .