-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python2.7 sysconfig broken under virtualenv #118
Comments
The culprit is this line at /usr/lib/python2.7/sysconfig.py:285
There is no '/usr' in the stdlib path under virtualenv, so the string replace above doesn't do anything. I don't know whose bug this is really, or how best to fix it, so I'll leave it up to you all from here. |
I encountered this issue as well. The previous poster's quick fix worked for me as a temporary solution. |
It looks like the function path_locations() in virtualenv.py needs to be special cased for Debian based systems with Python 2.7. On my Ubuntu 11.04 machine
virtualenv puts stuff in $VIRTUAL_ENV/lib, $VIRTUAL_ENV/include etc. My version of bukzor's workaround is: Activate the virtualenv |
I want to install numpy with virtualenv on Ubuntu 11.04 as well. Encounter error. This is my log:
|
Thanks, for the update. We're aware of this issue and I hope to look at in more depth this weekend. |
Managed to get it working with the following workaround: mkdir $VIRTUAL_ENV/local |
This fix is broken in certain setups. If the python virtualenv path includes So, moving the virtualenv will avoid the problem: worth knowing for anyone who likes to install things under |
still can't install numpy under virtualenv, but I also couldn't install it with pip just in system env. |
Something in sysconfig in python 2.7 seems to be at fault.
|
This issue is caused by a patch applied by Ubuntu that specifically replaced /usr/local with /usr in several functions. Line 63404 in https://launchpadlibrarian.net/151545955/python2.7_2.7.3-5ubuntu4.3.diff.gz. This stinks of taking a shortcut to support Ubuntu's deviations from the typical posix_local schema. Annoying. For future reference: moving your virtualenv out of /usr/local... will fix it. |
Hit this on Ubunu 12.04 and pip 1.4.1, virtualenv 1.10.1....moving the virtualenv out of |
running into the same issue File "/usr/lib/python2.7/sysconfig.py", line 344, in _init_posix raise IOError(msg) Cleaning up... |
the file exists in /usr/local ..but i am not sure how to make it read from there .. and where exaclty it should be root@njain2:/usr/local/horizon# ls /usr/horizon/.venv/lib/python2.7/config/Makefile |
i'm running into this same issue trying to install numpy in a docker container. |
@Neetuj: The culprit for you is still this line at /usr/lib/python2.7/sysconfig.py:285, shown above, although for a different reason. |
This was apparently an ill-conceived patch released by ubuntu for precise: The replace statement is gone in trusty, but the scheme is still set to 'posix-local', so virtualenv's workaround persists, causing bugs in the coveragepy test suite under ubuntu: https://bitbucket.org/ned/coveragepy/issue/337/test-failures-on-tip#comment-13653960 |
I have the same problem - for installing Pilow on virtualenv creating pip-egg-info/Pillow.egg-info writing pip-egg-info/Pillow.egg-info/PKG-INFO writing top-level names to pip-egg-info/Pillow.egg-info/top_level.txt writing dependency_links to pip-egg-info/Pillow.egg-info/dependency_links.txt writing manifest file 'pip-egg-info/Pillow.egg-info/SOURCES.txt' warning: manifest_maker: standard file '-c' not found error: invalid Python installation: unable to open /usr/lib/python2.7/config/Makefile (No such file or directory) Cleaning up... Is there any workaround ? |
This is preventing numpy from installing correctly:
Quick fix:
mkdir local
ln -s ../lib local/lib
The text was updated successfully, but these errors were encountered: