python - Problems installing pandas and numpy on Mac OSX -


i playing python's pandas package before getting o'reilly book. when tried install pandas after installing xcode , epdfree pandas installation using easy_install presented many warnings, , when tested see if pandas working clear not. have tried remove , re-install pandas , numpy several times no success. new surely doing wrong.

this when run python , try import pandas , numpy:

$ python python 2.7.2 (default, oct 11 2012, 20:14:37)  [gcc 4.2.1 compatible apple clang 4.0 (tags/apple/clang-418.0.60)] on darwin type "help", "copyright", "credits" or "license" more information. >>> import numpy traceback (most recent call last):   file "<stdin>", line 1, in <module> importerror: no module named numpy >>> import pandas no module named numpy traceback (most recent call last):   file "<stdin>", line 1, in <module>   file "/library/python/2.7/site-packages/pandas-0.12.0-py2.7-macosx-10.8-intel.egg/pandas/__init__.py", line 6, in <module>     . import hashtable, tslib, lib   file "numpy.pxd", line 157, in init pandas.hashtable (pandas/hashtable.c:19547) importerror: no module named numpy 

is there way can either fix or start on entire installation?

here more information when try install pandas , numpy:

$ sudo easy_install pandas password: searching pandas best match: pandas 0.12.0 processing pandas-0.12.0-py2.7-macosx-10.8-intel.egg pandas 0.12.0 active version in easy-install.pth  using /library/python/2.7/site-packages/pandas-0.12.0-py2.7-macosx-10.8-intel.egg processing dependencies pandas finished processing dependencies pandas  $ sudo easy_install numpy searching numpy best match: numpy 1.6.1 numpy 1.6.1 active version in easy-install.pth  using /system/library/frameworks/python.framework/versions/2.7/extras/lib/python processing dependencies numpy finished processing dependencies numpy 

start on cleaner way. i'd recommend looking tools pyenv , virtualenv if going amount of work python , when comes installing additional packages. pyenv lets manage , switch between multiple versions (including micro versions x.x.3, x.x.5, etc). virtualenv lets create isolated python environments can pin down versions of site-packages specific particular project.

it go like:

just using virtualenv:

$ pip install virtualenv $ virtualenv foo $ source foo/bin/activate $ pip install pandas $ pip install numpy 

or, using pyenv + virtualenv (for additional control on python versions, e.g. specify 2.7.2), first install pyenv, then:

$ pip install virtualenv $ pyenv install 2.7.2 $ pyenv shell 2.7.2 $ virtualenv `which python` foo $ source foo/bin/activate     $ pip install pandas $ pip install numpy 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -