Reputation: 6394
I have just tried to set install an application in my new virtual environment.
To create my virtual environment I used:
virtualenv -p /usr/bin/python2.6/python2.6 rollEnv2 --no-site-packages
Then to install the application, I used:
python setup.py install
But I get an error at the end:
File "/home/aaron/workspace/rollEnv2/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/package_index.py", line 475, in fetch_distribution
AttributeError: 'NoneType' object has no attribute 'clone'
Well lets try to serve the application anyway:
paster serve development.ini
Error:
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 588, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (WebOb 1.0.8 (/usr/lib/python2.7/site-packages), Requirement.parse('WebOb==0.9.6.1'))
(rollEnv2)
Seems like an obvious error, lets just:
easy_install WebOb==0.9.6.1
But:
WebOb 0.9.6.1 is already the active version in easy-install.pth
So what could be the problem here? It is as if easy install is looking in the base Python directory instead of the virtualenv directory. But ideally it would be nice to fix the original AttributeError: 'NoneType' object has no attribute 'clone'
.
I've googled around, but I just cant seem to find a decent answer to this.
Any ideas?
Upvotes: 0
Views: 323
Reputation: 5442
First I would advise you to try out mkvirtualenv also, why are you still using easy_install and haven't switched to pip ?
By default virtualenv uses Distribute not setuptools. I think you are using setuptools, so just recreate your environment with setuptools.
From the virtualenv:
--distribute Ignored. Distribute is used by default. See
--setuptools to use Setuptools instead of Distribute.
Upvotes: 1