I’m deploying a Django app to a dev server and am hitting this error when I run
pip install -r requirements.txt:
Traceback (most recent call last): File "/var/www/mydir/virtualenvs/dev/bin/pip", line 5, in <module> from pkg_resources import load_entry_point ImportError: No module named pkg_resources
pkg_resources appears to be distributed with
setuptools. Initially I thought this might not be installed to the Python in the virtualenv, so I installed
setuptools 2.6 (same version as Python) to the Python site-packages in the virtualenv with the following command:
sh setuptools-0.6c11-py2.6.egg --install-dir /var/www/mydir/virtualenvs/dev/lib/python2.6/site-packages
EDIT: This only happens inside the virtualenv. If I open a console outside the virtualenv then
pkg_resources is present, but I am still getting the same error.
Any ideas as to why
pkg_resources is not on the path?