-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Unable to find venv/lib/python2.7/config/Makefile #1074
Comments
cc @dholth maybe a corner case here, but a try/except around these sysconfig calls may be in order. note that virtualenv patches sysconfig, but that patch logic has been static, even going back to v1.7 it seems. maybe it's just a sysconfig bug, or a debian bug. not sure |
That variable isn't even important/available until Python 3.3ish. You won't lose anything by guarding it. There is a second use of sysconfig in that module but it's just to get the python version. |
function in case of broken sysconfig. fix #1074
fixed in #1095 |
Not fixed in 1.4.1 |
@benliles trace? we added a catch for IOError with a test in 1.4.1. |
Traceback (most recent call last): |
@benliles this is different. this is a trace from setuptools (not pip) related to |
Something in sysconfig in python 2.7 seems to be at fault. Try calling Also reported in virtualenv's issue tracker: #118. My fix:
|
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. |
running into the same issue .. any pointers ? root@njain2:/usr/local/horizon# pip --version File "/usr/lib/python2.7/sysconfig.py", line 344, in _init_posix
IOError: invalid Python installation: unable to open /usr/horizon/.venv/lib/python2.7/config/Makefile (No such file or directory) 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 |
Blech. Burned as well! I have a virtualenv at @nicksloan Did you/someone report this with Ubuntu? Where is that so I can +1? :-) |
@whit537 I thought I did, but I couldn't find it last time I looked. |
FWIW, I am only getting this on Ubuntu Precise, not on Lucid, Saucy, Trusty or Utopic. Also, easy_install only prints |
For those looking for a quick and dirty solution without rebuilding the virtualenv in a new location, symlinking the virtualenv to the location where the file is missing (but continuing to use the one in |
The upgrade is needed due to the version of wheels pulled in. When pulling in PyYAML as a dependency, PyYAML tries to import a function from wheels that throws an IOError on some patched Ubuntu versions. The issue is similar to: pypa/pip#1074 Wheels has a fix or that bug and virtualenv pulls that version of wheels in so it should no longer be an issue.
The upgrade is needed due to the version of wheels pulled in. When pulling in PyYAML as a dependency, PyYAML tries to import a function from wheels that throws an IOError on some patched Ubuntu versions. The issue is similar to: pypa/pip#1074 Wheels has a fix or that bug and virtualenv pulls that version of wheels in so it should no longer be an issue.
Seems the path is getting mangled. It's supposed to be looking for /usr/local/myapp/venv/lib/python2.7/config/Makefile but is actually looking for /usr/myapp/venv/lib/python2.7/config/Makefile (dropping the local)
The text was updated successfully, but these errors were encountered: