pip: Unable to find venv/lib/python2.7/config/Makefile
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)
- Ubuntu 12.04
- Python 2.7.3
- pip 1.4
- virtualenv 1.7.1.2
Traceback (most recent call last):
File "/usr/local/myapp/venv/bin/pip", line 9, in <module>
load_entry_point('pip==1.4', 'console_scripts', 'pip')()
File "/usr/local/myapp/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/myapp/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 2279, in load_entry_point
return ep.load()
File "/usr/local/myapp/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 1989, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/local/myapp/venv/local/lib/python2.7/site-packages/pip/__init__.py", line 11, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/local/myapp/venv/local/lib/python2.7/site-packages/pip/vcs/subversion.py", line 4, in <module>
from pip.index import Link
File "/usr/local/myapp/venv/local/lib/python2.7/site-packages/pip/index.py", line 32, in <module>
from pip.wheel import Wheel, wheel_ext, wheel_setuptools_support, setuptools_requirement
File "/usr/local/myapp/venv/local/lib/python2.7/site-packages/pip/wheel.py", line 18, in <module>
from pip import pep425tags
File "/usr/local/myapp/venv/local/lib/python2.7/site-packages/pip/pep425tags.py", line 98, in <module>
supported_tags = get_supported()
File "/usr/local/myapp/venv/local/lib/python2.7/site-packages/pip/pep425tags.py", line 61, in get_supported
soabi = sysconfig.get_config_var('SOABI')
File "/usr/lib/python2.7/sysconfig.py", line 577, in get_config_var
return get_config_vars().get(name)
File "/usr/lib/python2.7/sysconfig.py", line 476, in get_config_vars
_init_posix(_CONFIG_VARS)
File "/usr/lib/python2.7/sysconfig.py", line 344, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open /usr/myapp/venv/lib/python2.7/config/Makefile (No such file or directory)
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 15 (5 by maintainers)
Commits related to this issue
- function in case of broken sysconfig. fix #1074 — committed to dholth/pip by dholth 11 years ago
- Merge pull request #1095 from qwcode/fix-1074 function in case of broken sysconfig. fix #1074 — committed to pypa/pip by qwcode 11 years ago
- Fix virtualenv error due to Ubuntu patches applied on python package See https://github.com/pypa/pip/issues/1074 — committed to grosenbaum/gcd-django-vagrant-install by deleted user 9 years ago
- Fix unit tests I broke: - Catch IOError wherever sysconfig is used (#1074) - Reapply #2915 Also, be sure to normalize the SOABI — committed to natefoo/pip by natefoo 9 years ago
- Upgrade virtualenv for bundled installers 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 thro... — committed to kyleknap/aws-cli by kyleknap 8 years ago
- Upgrade virtualenv for bundled installers 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 thro... — committed to kyleknap/aws-cli by kyleknap 8 years ago
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.