1
I have been hacking away at getting packages to work in my initial coding stages. I only recently stumbled upon virtualenv and found the need to install Python using Homebrew.
I have installed Homebrew and Python using it and pip is working. All my executables appear to be in the correct location and they are in the PATH. So when I load python from the terminal I get version 2.7.6 (not the standard 2.7.5).
The issue is that I have added so many packages and things to the standard installation that it is causing hassles. For example, when I try to create a virtualenv, there is a traceback error as such:
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: virtualenv==1.8.4
The virtualenv version I have is 1.11.x. It is clearly looking for packages in /System/Library/... which is the preinstalled python location.
Is there a way to clean the pre-installation of Python on a Mac. In other words, can I restore it to stock as it was when the Mac was first turned on?
That didn't work but somehow after massing around with soft links and the like I managed to restore everything to the way I needed it. If only I knew what I could give a clear answer to this. – bteres – 2014-07-01T15:10:49.747