This is partly a question, partly my own findings on what I found to be the issue when I encountered this error:
(cdbak)USER-MBP-2:.virtualenvs <YOUR_USER_NAME>$ pip
Traceback (most recent call last):
File "/Users/<YOUR_USER_NAME>/.virtualenvs/cdbak/bin/pip", line 6, in <module>
from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
This issue arose when I tried to install pypsum via pip in my virtual environment for use with django.
(cdbak)USER-MBP-2:.virtualenvs <YOUR_USER_NAME>$ pip install pypsum
I have been working in virtual environments, so I was fortunate that after it broke, I could just reset my virtual environment with the script I had written.
I copied the output from the installation process and started looking closer into it and it seems like there is something that goes wrong in setuptools.
The installation process tries to build the package but it does not find build_py in the setuptools which causes it to 'patch' the setuptools installation by renaming the currently installed setuptools.
This is the part where I think funky stuff starts to happen:
Setuptools installation detected at /Users/<YOUR_USER_NAME>/.virtualenvs/cdbak/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
Egg installation
Patching...
Renaming /Users/<YOUR_USER_NAME>/.virtualenvs/cdbak/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg into /Users/<YOUR_USER_NAME>/.virtualenvs/cdbak/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg.OLD.1321360113.04
And then it goes on to try and install another version of setuptools or so it seems:
After install bootstrap.
Creating /Users/<YOUR_USER_NAME>/.virtualenvs/cdbak/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info
Creating /Users/<YOUR_USER_NAME>/.virtualenvs/cdbak/lib/python2.7/site-packages/setuptools.pth
But it does not seem to install the setuptools package correctly in its current location and then results in a missing pkg_resources module (In fact, it is missing a lot of other things too)
[Setup]
OS: Mac OS X Lion
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05)
virtualenv v1.6.1
Fresh virtual environment using virtualenvwrapper using requirements file to install these packages:
mercurial==1.9.3
Django>=1.3.1
MySQL-python>=1.2.3
Sphinx
wsgiref
pylint
yolk
dbgp
django-debug-toolbar
south
I was able to use pip to install other packages just fine but for some reason it seems to break with this installation.
[Question]
- Do people think this is a mistake with the installation process of this package?
- Or, is it a mistake with setuptools?
- Or, am I just installing it incorrectly?
[Extra Note]
I can attach the file with the entire output but its a long file and I decided to only extract the segments I felt were relevant. If you would like to view the full file, I can upload that too.