After upgrading to OS X Mavericks, it seems Python broke. I get the following when I try to run
~ $ ipython Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/bin/ipython", line 5, in <module> from pkg_resources import load_entry_point ImportError: No module named pkg_resources
Similarly I noticed that some other packages seem to be missing, even when using the default
python (as opposed to
~ $ python Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import numpy Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named numpy
numpy definitely worked before the upgrade. Any ideas on what could be causing this?
Update: Just noticed that running
sudo easy_install numpy makes
numpy work again. It gives the following output:
WARNING: Improper use of the sudo command could lead to data loss or the deletion of important system files. Please double-check your typing when using sudo. Type "man sudo" for more information. To proceed, enter your password, or type Ctrl-C to abort. Password: Searching for numpy Best match: numpy 1.6.2 Adding numpy 1.6.2 to easy-install.pth file Using /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python Processing dependencies for numpy Finished processing dependencies for numpy
I am 100% sure I had numpy installed already when the machine was still running OS X Mountain Lion. Do I need to reinstall all of my python packages now? If so is there an easy way to do this automatically?