Installation issue with --editable option
See original GitHub issueHello,
I’m trying to install pandas on Mac OS X 10.11.6 in a Django project. Pandas library is used with one of the 3rd party libraries that I am using in the project.
Since I don’t want to switch to different package manager (Anakonda) just for installing pandas (I’m using pip now), in order for me to get the C files compiled, I decided to install pandas by including --editable git+git://github.com/pydata/pandas.git@v0.18.1#egg=pandas
in the requirements.txt
file and the library is now installed in my src
dir and there’s a symlink in my virtualenv’s site-packages
which points to it.
This gets these headers compiled, but causes many strange importing errors in pandas source code itself when it is imported by a third party library that is also installed with --editable
mode. F. ex. file at Users/eimantas/Desktop/Projects/WeShareSolar/mijnstroom/virtualenv/src/knmi-py/knmi/parsers.py
has this line import pandas as pd
. And I had to edit this code block in virtualenv/src/pandas/pandas/__init__.py
for things to work:
try:
# XXX: I had to comment this out for things to work:
# from pandas import hashtable, tslib, lib
import hashtable, tslib, lib
except ImportError as e: # pragma: no cover
module = str(e).lstrip('cannot import name ') # hack but overkill to use re
raise ImportError("C extension: {0} not built. If you want to import "
"pandas from the source directory, you may need to run "
"'python setup.py build_ext --inplace' to build the C "
"extensions first.".format(module))
But then another importing error appears here: virtualenv/src/pandas/pandas/core/config.py
:
File "/Users/eimantas/Desktop/Projects/WeShareSolar/mijnstroom/virtualenv/src/pandas/pandas/core/config.py", line 57, in <module>
import pandas.compat as compat
AttributeError: 'module' object has no attribute 'compat'
What should I do to get these things fixed ? I’d love to be able to use this library with pip and Django.
Issue Analytics
- State:
- Created 7 years ago
- Comments:21 (11 by maintainers)
From the output above from testing the django app, I see you also get those warnings:
RuntimeWarning: datetime.datetime size changed, may indicate binary incompatibility. Expected 64, got 48
. So apparantly, some other import has adapted datetime objects. To find the culprit, you can maybe in the console import packages that are used in the django app one by one, and see when importing pandas starts failing. Googling gave me this: https://github.com/spulec/freezegun/issues/13@jorisvandenbossche thank you! Apparently freezegun is causing the problems. I’ll continue from there now.