TEOS-10/GSW-Python

Complilation failure during install via pip3

webbpinner opened this issue · 3 comments

I just tried to install gsw on Mac OS X (v10.10) using pip3 and got the following error:

/usr/local/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
  #warning "Using deprecated NumPy API, disable it by " \
   ^
  src/_ufuncs.c:13:10: fatal error: 'gswteos-10.h' file not found
  #include "gswteos-10.h"
           ^
  1 warning and 1 error generated.
  error: command 'clang' failed with exit status 1

Looking at ./src/_ufuncs.c I was wondering if there's a path error when including gswteos-10.h since the header file is in the /src/c_gsw subdirectory.

I had just previously used pip3 to install Pandas (v0.20.3) which installed numpy (v1.7.0).

Is this a possible bug in the installation script or is possibly an issue with my local setup?

Thanks,
-W

Not sure why clang is failing there :-/ setup.py does have that directory in the include_dirs section and everything works for me locally on a Linux machine (vanilla pip install), and on a Travis-CI instance of OS X here. (Note that in the OS X image we used python setup.py install but that should be the same for latest version of pip.)

What is your version of pip and setuptools? Can you try upgrading them?

If nothing works I recommend the conda package and the conda-forge channel where you can install the gsw binary with conda install -c conda-forge gsw.

Thank you for your prompt response. I tried to back out of what I was doing and install from scratch. The first thing I encountered was that OS X v10.10 doesn't include python3.

In my first attempt I used Brew to install python3... after which I was unable to install gsw.
In my second attempt I installed python3 via the installer from python.org. Doing this I was able to successfully install gsw.

Thanks for pointing me in the right direction.

Cool. Closing it then.