Unable to find venv/lib/python2.7/config/Makefile
See original GitHub issueSeems 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)
Issue Analytics
- State:
- Created 10 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Python interpteter can't find module in virtualenv, but pip ...
I would remove the current virtualenv , recreate it without sudo and then install all requirements with the virtualenv's pip. cd ~/Downloads rm ......
Read more >Linked
"invalid Python installation: unable to open /usr/lib/python2. 7/config/Makefile (No such file or directory)" - Ask Ubuntu.
Read more >Unable to create a sample RA as per the steps mentioned ...
Hi Neharika, · Type the following steps: · #1. Execute the · #2. Edit the · min-venv: · $(HIDE)virtualenv $(VENV) --no-pip · #3....
Read more >Python 2.7 unable to find it's header files in virtualenv
This bug breaks any C dependant code in virtualenv when using Python 2.7 and should be considered as serious issue.
Read more >Installing mod_wsgi error - config.status: error: cannot find ...
Below, I'm trying to install mod_wsgi. [root@server]# ./configure --with-python=/usr/local/bin/python2.7 checking for apxs2...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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
/usr/local
) worked around the issue for me.