Skip to content

Building the library fails : ''pandas/index.c: No such file or directory" #2439

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sebpiq opened this issue Dec 6, 2012 · 25 comments
Closed
Labels
Build Library building on various platforms
Milestone

Comments

@sebpiq
Copy link

sebpiq commented Dec 6, 2012

I just forked and cloned the master branch (last commit from 6th December), and building fails with the following error :

> python setup.py build_ext --inplace
running build_ext
building 'pandas.index' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/home/spiq/pandas/env/local/lib/python2.7/site-packages/numpy/core/include -Ipandas/src/klib -Ipandas/src -I/usr/include/python2.7 -c pandas/index.c -o build/temp.linux-i686-2.7/pandas/index.o
gcc: error: pandas/index.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
error: command 'gcc' failed with exit status 4

Any idea ?

@sebpiq
Copy link
Author

sebpiq commented Dec 6, 2012

Commit hash is 67ef67f

@jseabold
Copy link
Contributor

jseabold commented Dec 6, 2012

What Cython version are you using?

@sebpiq
Copy link
Author

sebpiq commented Dec 6, 2012

I'm not using Cython

@jseabold
Copy link
Contributor

jseabold commented Dec 6, 2012

You have to use Cython to build pandas development version from github.

@jseabold
Copy link
Contributor

jseabold commented Dec 6, 2012

@sebpiq
Copy link
Author

sebpiq commented Dec 6, 2012

Ok ... that would be nice to have somehow this info in here : http://pandas.pydata.org/developers.html
But thanks :)

@jseabold
Copy link
Contributor

jseabold commented Dec 6, 2012

IMO, it's pretty clear where it is under the installation instructions. Those are just instructions to build the library inplace so you can run the test suite not installation instructions.

@wesm
Copy link
Member

wesm commented Dec 6, 2012

The setup.py is supposed to have a better error message-- I did a lot of refactoring of the extensions recently so must have broken that part of the build file somehow.

@sebpiq
Copy link
Author

sebpiq commented Dec 6, 2012

Now I installed all the stuff, followed the instructions, but tests fail.

@changhiskhan
Copy link
Contributor

Which tests are failing?

On Dec 6, 2012, at 11:11 AM, sebpiq [email protected] wrote:

Now I installed all the stuff, followed the instructions, but tests fail.


Reply to this email directly or view it on GitHub.

@sebpiq
Copy link
Author

sebpiq commented Dec 6, 2012

Arr ... no no. My bad again. I should think before asking :) Sorry. However, many tests are skipped.

@sebpiq sebpiq closed this as completed Dec 6, 2012
@aflaxman
Copy link
Contributor

it seems that the informative error message has disappeared again, I just landed here googling my build error of:

gcc: pandas/index.c: No such file or directory

and installing cython fixed things

@ghost
Copy link

ghost commented Feb 13, 2013

can you try out #2860?

@metakermit
Copy link
Contributor

It still doesn't show any error message about missing cython. Also left me buzzing around the web for some time, searching for the answer. Mentioning it explicitely in these two documents would help:

http://pandas.pydata.org/developers.html#testing
https://github.com/pydata/pandas#installation-from-sources

Also, maybe there's some way to add a dependency on cpython when issuing pip install -e or python setup.py develop.

@ghost
Copy link

ghost commented Mar 14, 2013

@Kermit666 , does "it" mean you've tried #2860 and it doesn't fix the problem for you?

@josephdunn
Copy link

Could it be a virtualenv screwing things up? I noticed that if I try to install pandas from source, but I have cython installed system-wide, and I'm running from a virtualenv, I get the behavior @Kermit666 mentions. The fix is to create your virtualenv with the --system-site-packages argument.

@ghost
Copy link

ghost commented Mar 14, 2013

Tried running in a fresh virtualenv with system-wide cython. With #2860 I get the proper
warning message.

@metakermit
Copy link
Contributor

@y-p I haven't tried that branch, just the master (thought that it was merged by now as a month passed and I didn't notice the "open" note (still adjusting to GitHub)). Anyway, glad to hear it's fixed by now. Hopefully it will get merged soon.

@josephdunn - I didn't have cython installed anywhere. The only problem was that I didn't know it was a dependency since it wasn't mentioned in the guides linked in my last comment.

@jreback
Copy link
Contributor

jreback commented Mar 15, 2013

I believe you link to this page, and its clearly mentioned in order to build dev libraries
http://pandas.pydata.org/pandas-docs/dev/install.html#optional-dependencies

but suppose could be mentioned on developer pages

ghost pushed a commit that referenced this issue Mar 15, 2013
BLD: bring back build_ext warning message cython is missing #2439
@ghost
Copy link

ghost commented Mar 15, 2013

Merged into master. should be fixed.

@metakermit
Copy link
Contributor

OK, great.

Concerning the docs, I linked to different pages:

http://pandas.pydata.org/developers.html#testing
https://github.com/pydata/pandas#installation-from-sources

They are the first thing I would open when I want to hack on someone's code

  • project website - community - developer's page,
  • github - README.md.

@metakermit
Copy link
Contributor

This is how I would hint it in the README file:

#3067

@ghost
Copy link

ghost commented Mar 16, 2013

@Kermit666, could you verify that the fix in master works for you? there was a report saying
it didn't actually fix the problem.

@metakermit
Copy link
Contributor

Yes, the fix works for me too now:

Exception: Cython-generated file 'pandas/index.c' not found.
                         Cython is required to compile pandas from a development branch.
                         Please install Cython or download a release package of pandas.

On Sun, Mar 17, 2013 at 12:25 AM, y-p [email protected] wrote:

@Kermit666 https://github.com/kermit666, could you verify that the fix
in master works for you? there was a report saying
it didn't actually fix the problem.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2439#issuecomment-15014115
.

@xchaoinfo
Copy link

xchaoinfo commented Oct 16, 2016

@metakermit
I try to install pandas using pip in a new virtualenv environment, and encounter with same problem.
I solve the problem by pip install cython in virtualenv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

No branches or pull requests

9 participants