-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Installation problem on FreeBSD 10.0 with Python 3.4.3 #10510
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
Comments
Are there errors related to Cython in the setup log if you run
|
No errors from Cython. Cython was installed from pip. I have also tried removing Cython and installing/compiling it manually from the latest 0.22.1 tarball. Cython installs perfectly without issues as far as I can see. I removed and re-installed Pandas from the repo after manually installing Cython and this had no effect. I have also been able to reproduce this error on a clean FreeBSD 10.1 vm. |
Sorry, I mean when you build install pandas. Something like:
Does the log from the last step show anything strange? |
There's a load of warnings and notes, but it does seem to build all the required files. Here's the full output: |
@meeb these are all ok |
Yeah thought as much. Any other info I can provide or is this actually just something wrong in the build process on this platform? |
I think you might have a partial pip install. try
|
I've tried installing this in multiple completely clean venvs on different FreeBSD 10.1 installs (on different physical machines) all with the same results. It's reproducible for Python3.4.2 on every FreeBSD 10.1 install I've tried so far. Interestingly, I've just noticed that installing pandas in a Python2.7.9 venv works fine without any errors at all on the same machines, both building from repo and installing via pip. Log: |
Hi! ... But on FreeBSD 10, we are using clang3.4, which choose standard C99 model by default. So... how to fix it? I will compile it with following command: CFLAGS='-fgnu89-inline' python setup.py build_ext -f --inplace Maybe the proper way is patching the |
way to do this properly is to put in options based on the platform in |
Hi @jreback ! E.g. consider PANDAS_INLINE npy_int64
get_nat(void) {
return NPY_MIN_INT64;
} Note that there is a macro called This macro is defined in Those code are not generated by cython. IMO, there are two solution for this inline problem. (To be honest, many project still have this problem on FreeBSD, e.g. our depend:
|
ok I see well happy to take a patch that ifdefs things and add platform based CFLAGS is ok too (would add in setup.py) |
btw tha pandas.json IS ujson (with a layer on top for pandas use) |
ok, i will send a PR later 😄 |
I know this issue is closed, but just for anyone interested: The problem also exists with Python 3.4.3 on FreeBSD 10.2 (freshly installed from CD) at least on my machine. |
Hi @usrbinerl ! |
Yes, I just did, but didn't resolve the issue. But take that with a grain of salt. I lack experience with compiling python from source, so I may have done something wrong. |
@usrbinerl Here is my workflow, FYI :) pyvenv-3.4 venv
source venv/bin/activate
pip install cython
pip install git+https://github.com/pydata/pandas.git Note that Then, (venv) > python
Python 3.4.3 (default, May 26 2015, 17:46:50)
[GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)] on freebsd10
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
>>> |
Thanks. I'll try with your tips again this afternoon. |
@meeb @iblis17 @usrbinerl I encountered a similar problem on Mac OS (which also uses Clang) when building a Pandas with debug symbols. I tackled this by adding the |
@jvkersch Nice work! |
Works for me too now on FreeBSD. Thanks for your help. |
It is currently impossible to build a debug version of Pandas on Mac OS, since some of the C function declarations are declared as `inline`, and compiling in debug mode turns off optimizations and hence inlining. While this could be solved by adding a compile argument to `setup.py` to use the C89 behavior for inline as in #10510, I believe an ultimately cleaner solution may consist of declaring inlined functions as `static`, so that the code is properly C99-compliant. For the implementation, I added the `static` keyword to the definitions of `PANDAS_INLINE` and `P_INLINE` (and removed duplicate occurrences of `static` from some function declarations), so that future implementations that use those defines are automatically compliant. This is slightly different from e.g. Cython, which defines `CYTHON_INLINE` as `inline` and declares everything as `static CYTHON_INLINE`. Author: Joris Vankerschaver <[email protected]> Closes #12123 from jvkersch/dev/static-inline and squashes the following commits: 6a225e7 [Joris Vankerschaver] MAINT: Remove compile flag that is no longer needed. a5138f0 [Joris Vankerschaver] DEV: Add static modifier to inline declarations.
You might also want to try adding |
@bashtage is that a more general comment or only for FreeBSD? |
Hi,
I'm attempting to install pandas in a virtualenv on a FreeBSD system with Python 3.4.3. I can't see that I'm missing any obvious steps or dependancies. I get an error in a C module when importing pandas if I install pandas from pip, from a release tarball and with the repo (same error every time) that would imply something pretty major is missing. numpy, scipy and scikit-learn all install without any issues in the same venv. Example of the error:
When installing from a tarbal or the a checkout of the repo where setup.py is accessible and following the above suggestion (
python setup.py build_ext --inplace
) it compiles without issue it does not resolve the issue.Some system information (print_versions.py taken from a repo checkout):
Any pointers would be appreciated, thanks.
The text was updated successfully, but these errors were encountered: