Problems building under mac

14 views
Skip to first unread message

CyclingNinja

unread,
Nov 3, 2016, 3:12:25 PM11/3/16
to cython-users
Hi guys

So I got my model working and everything, thanks to everyone for your help.

I've not sent it out to my colleges to use, however, it doesn't like my setup.py under mac.


from distutils.core import setup
from Cython.Build import cythonize
import numpy

ext_modules = cythonize("cyDensity.pyx",
                        sources=['DensityPyMod.cpp'],
                        #libraries=['stdc++'],
                        language="c++"
                        )

setup(
    name="DensityPyMod",
    ext_modules=ext_modules,
    include_dirs=[numpy.get_include()]
)


It particularly hates `include_dirs=[numpy.get_include()]`. We fixed it by going

cp -r /usr/local/lib/python3.5/site-packages/numpy/core/include/numpy /usr/local/include

But I don't like this solution, is there a better work around that anyone else is using.
(We're installing cython under pip, btw)

Ta very much, once again :)

Chris Barker

unread,
Nov 3, 2016, 3:31:53 PM11/3/16
to cython-users
On Thu, Nov 3, 2016 at 8:57 AM, CyclingNinja <s.m.b...@sheffield.ac.uk> wrote:
I've not sent it out to my colleges to use, however, it doesn't like my setup.py under mac.
... 
It particularly hates `include_dirs=[numpy.get_include()]`. We fixed it by going

how does it express this hatred?  (I.e error messages, etc!)

Also, how do they have python, numpy, etc installed on the Mac?

What version of OS-X?

What version of XCode?

In short, that construction has worked fine for my on many Macs with many projects over many years.

So I expect something is up with that user's system.

-CHB
 



 
cp -r /usr/local/lib/python3.5/site-packages/numpy/core/include/numpy /usr/local/include

But I don't like this solution, is there a better work around that anyone else is using.
(We're installing cython under pip, btw)

Ta very much, once again :)

--

---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris....@noaa.gov
Reply all
Reply to author
Forward
0 new messages