Skip to content

Using --target / -t breaks if a dependency requires 'setuptools' #575

techniq opened this Issue Jun 12, 2012 · 2 comments

1 participant

techniq commented Jun 12, 2012

I've ran into this twice today while trying to perform 'pip install -t packages -r requirements.txt' on 2 dependencies that have 'setuptools' in\install_requires (Flask-SqlAlchemy and python-daemon - ex.

It appears when using -t pip uninstalls distribute in site-packages (I'm using virutalenv) to reinstall it into packages, but doing so breaks it's ability to install itself back. Pip then fails the overall install (leaving my packages directory empty), but this also leaves the environment without a working seutptools, so I can't run 'pip install distribute' to reinstall it. I usually end up running rmvirtualenv and creating a new virtualenv with --distribute. I must of done this 20 times today trying to track down what was going on and why pip/setuptools kept breaking.

Below is a partial log showing the error (the requirements.txt had Flask-Mail, which depends on Lamson, which depends on python-daemon, which depends on setuptools).


Running install for python-daemon

Found existing installation: distribute 0.6.27
Uninstalling distribute:
Successfully uninstalled distribute
Running install for distribute
Before install bootstrap.
Scanning installed packages
No setuptools distribution found

Installing easy_install script to /var/folders/q8/46_0bcq51jq667f7jjks__6h0000gn/T/tmpe6F4ty/bin
Installing easy_install-2.7 script to /var/folders/q8/46_0bcq51jq667f7jjks__6h0000gn/T/tmpe6F4ty/bin
After install bootstrap.
Don't have permissions to write /var/folders/q8/46_0bcq51jq667f7jjks__6h0000gn/T/tmpe6F4ty/lib/python/setuptools-0.6c11-py2.7.egg-info, skipping
Creating /var/folders/q8/46_0bcq51jq667f7jjks__6h0000gn/T/tmpe6F4ty/lib/python/setuptools-0.6c11-py2.7.egg-info
Creating /var/folders/q8/46_0bcq51jq667f7jjks__6h0000gn/T/tmpe6F4ty/lib/python/setuptools.pth

Running install for lockfile
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named setuptools
Complete output from command /Users/smlynch/Development/virtualenv/env27/bin/python -c "import setuptools;file='/Users/smlynch/Development/virtualenv/env27/build/lockfile/';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /var/folders/q8/46_0bcq51jq667f7jjks__6h0000gn/T/pip-mh5ng4-record/install-record.txt --install-headers /Users/smlynch/Development/virtualenv/env27/bin/../include/site/python2.7 --home=/var/folders/q8/46_0bcq51jq667f7jjks__6h0000gn/T/tmpe6F4ty:
Traceback (most recent call last):

File "", line 1, in

ImportError: No module named setuptools

techniq commented Jun 12, 2012

Looking through other issues / pull requests, this looks like a duplicate of issue #440 and should be fixed by pull request #574. I'm going to install from develop head and test and will reopen the issue if not. Sorry for the noise.

@techniq techniq closed this Jun 12, 2012
@techniq techniq reopened this Jun 12, 2012
techniq commented Jun 12, 2012

Just installed pip from develop (pip --version shows 1.1.post2), but same issue happens (distribute is attempted to be reinstalled and breaks setuptools). Reopened issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.