Links between source-installed pythas and python at home

advertisements

I am attempting to install the python package pandas.

All my existing python gear has been installed using home-brew / easy_install / pip, however pip and easy_install both fail on pandas -- claiming that i do not have numpy > 1.6 (though when in python numpy.__version__ returns 1.6.2).

Despite this pip install numpy --upgrade reports that I am up-to-date.

To hack around this, I git-cloned the source code down, and ran python setup.py install in my /Library/Python/... directory. It seemed to build okay, however when i import pandas, i get an error and i'm not sure what to do about it.

Can anyone help me link the compiled library to my existing install?

The error follows:

dlopen(/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_5a152bd-py2.7-macosx-10.7-x86_64.egg/pandas/lib.so, 2): Symbol not found: _floatify
  Referenced from: /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_5a152bd-py2.7-macosx-10.7-x86_64.egg/pandas/lib.so
Expected in: flat namespace
in /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_5a152bd-py2.7-macosx-10.7-x86_64.egg/pandas/lib.so
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_5a152bd-py2.7-macosx-10.7-x86_64.egg/pandas/__init__.py", line 10, in <module>
import pandas.lib as lib
ImportError: dlopen(/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_5a152bd-py2.7-macosx-10.7-x86_64.egg/pandas/lib.so, 2): Symbol not found: _floatify
Referenced from: /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_5a152bd-py2.7-macosx-10.7-x86_64.egg/pandas/lib.so
Expected in: flat namespace
in /usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.9.1.dev_5a152bd-py2.7-macosx-10.7-x86_64.egg/pandas/lib.so


This was discussed and resolved on GitHub: https://github.com/pydata/pandas/issues/2188. The issue had to due with Clang's C99 behavior w.r.t. inline C functions.