Hey everyone,

I installed pandas via pip git

pip install git+git://github.com/pydata/pandas.git

and during the installation it says:

Running setup.py install for pandas ... done Successfully installed pandas-0.18.0+207.gc6110e2

But when I want to import it, it gives an error

C extension: hashtable 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.

I already tried to run this but the response is always:

python: can't open file 'setup.py': [Errno 2] No such file or directory

Maybe I am in the wrong directory. So in which I am suppose to run it? Also I looked in site-packages but can't find pandas or something similar.

I am confused since it said it runs the setup.py during the installation...

Can anyone help? What I am doing wrong?

Thanks in advance

Leni

Comment From: jreback

are you trying to contribute? you need to git clone, see here

otherwise see installation instructions here

generally a pip install pandas (or much better is simply to use conda).

I think that pip doesn't install the deps correctly if you are installing like this (and that its failing because you don't have the build deps installed, e.g. cython/numpy).

Comment From: max-sixty

http://stackoverflow.com/questions/31495657/development-build-of-pandas-giving-importerror-c-extension-hashtable-not-bui

Think the error message from pandas could include --force

Comment From: jreback

@MaximilianR that's a good point. do you want to PR for an extended message?

Comment From: lherstix

I tried conda before but it is the same problem with importing. So I tried it in an new created environment and without. Installing seems to be always fine. Just importing is the same problem always

adding -force doesn't help since it can't find setup.py at all such that it still gives the error

Comment From: lherstix

so I found now the pandas in

/anaconda/lib/python2.7/site-packages

but still can't find any setup.py

Comment From: jreback

once you install via anaconda you don't need to do anything else.

conda create -n test pandas
source activate test
python -c 'import pandas; print(pandas.__version__)'

Comment From: lherstix

Great it worked, except form another name of the environment I don't what I did different last time. However, it worked! So thanks a lot!!! :) Could just explain me why do I need this environment?

Comment From: jreback

@lherstix you don't :> that was just a test the -n <name_of_environment> can be anything. its up to you (and you can have multiple ones). http://conda.pydata.org/docs/

Comment From: lherstix

Thanks a lot, that helped :)

Comment From: lherstix

Me again...

So after pandas worked fine, I installed seaborn the same way and in the same environment. Now I get an error for pandas and for seaborn when I import them: import pandas as pd import seaborn as sns I get the following error:

Traceback (most recent call last): File "test1.py", line 1, in <module> import pandas as pd File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/pandas/__init__.py", line 39, in <module> from pandas.core.api import * File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/pandas/core/api.py", line 10, in <module> from pandas.core.groupby import Grouper File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/pandas/core/groupby.py", line 18, in <module> from pandas.core.frame import DataFrame File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/pandas/core/frame.py", line 39, in <module> from pandas.core.series import Series File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/pandas/core/series.py", line 2944, in <module> import pandas.tools.plotting as _gfx # noqa File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/pandas/tools/plotting.py", line 27, in <module> import pandas.tseries.converter as conv File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/pandas/tseries/converter.py", line 7, in <module> import matplotlib.units as units File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/matplotlib/__init__.py", line 1131, in <module> rcParams = rc_params() File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/matplotlib/__init__.py", line 975, in rc_params return rc_params_from_file(fname, fail_on_error) File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/matplotlib/__init__.py", line 1100, in rc_params_from_file config_from_file = _rc_params_in_file(fname, fail_on_error) File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/matplotlib/__init__.py", line 1018, in _rc_params_in_file with _open_file_or_url(fname) as fd: File "/Users/lena/anaconda/envs/test/lib/python2.7/contextlib.py", line 17, in __enter__ return self.gen.next() File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/matplotlib/__init__.py", line 1000, in _open_file_or_url encoding = locale.getdefaultlocale()[1] File "/Users/lena/anaconda/envs/test/lib/python2.7/locale.py", line 543, in getdefaultlocale return _parse_localename(localename) File "/Users/lena/anaconda/envs/test/lib/python2.7/locale.py", line 475, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8

If I comment out import pandas as pd, I get:

Traceback (most recent call last): File "test1.py", line 9, in <module> import seaborn as sns File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/seaborn/__init__.py", line 1, in <module> from .rcmod import * File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/seaborn/rcmod.py", line 6, in <module> import matplotlib as mpl File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/matplotlib/__init__.py", line 1131, in <module> rcParams = rc_params() File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/matplotlib/__init__.py", line 975, in rc_params return rc_params_from_file(fname, fail_on_error) File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/matplotlib/__init__.py", line 1100, in rc_params_from_file config_from_file = _rc_params_in_file(fname, fail_on_error) File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/matplotlib/__init__.py", line 1018, in _rc_params_in_file with _open_file_or_url(fname) as fd: File "/Users/lena/anaconda/envs/test/lib/python2.7/contextlib.py", line 17, in __enter__ return self.gen.next() File "/Users/lena/anaconda/envs/test/lib/python2.7/site-packages/matplotlib/__init__.py", line 1000, in _open_file_or_url encoding = locale.getdefaultlocale()[1] File "/Users/lena/anaconda/envs/test/lib/python2.7/locale.py", line 543, in getdefaultlocale return _parse_localename(localename) File "/Users/lena/anaconda/envs/test/lib/python2.7/locale.py", line 475, in _parse_localename raise ValueError, 'unknown locale: %s' % localename ValueError: unknown locale: UTF-8

I hope it is understandable and you can help me! Greatz!

Comment From: jorisvandenbossche

@lherstix I suppose you are running a Mac? See http://conda.pydata.org/docs/troubleshooting.html#issue-valueerror-unknown-locale-utf-8-on-os-x

Comment From: lherstix

Yes yuo were right. and it works! Thank you!!