Header files in windows installers
![](https://secure.gravatar.com/avatar/62d2230ecc3f473201007d5385e339f8.jpg?s=120&d=mm&r=g)
I have a small c++ extension used to feed a 1d numpy array into a QPainterPath. Very simple just using PyArray_[Check|FLAGS|SIZE|DATA]. I developed it on debian which was of course very straightforward, but now I need to deploy on windows, which is of course where the fun always begins. I was unpleasantly surprised to discover that the numpy installers for window do not have an option to install the include files, which appear to be all that is needed to compile extensions that use numpy's C-api. I have actually managed to copy my set of include files from linux and with a few modifications to _numpyconfig.h got my extension compiled and working. Is there any chance that the includes could be included in future releases? Thanks, Matt Newell
![](https://secure.gravatar.com/avatar/5f88830d19f9c83e2ddfd913496c5025.jpg?s=120&d=mm&r=g)
On Thu, Feb 20, 2014 at 6:33 PM, Matt Newell <newellm@blur.com> wrote:
I have a small c++ extension used to feed a 1d numpy array into a QPainterPath. Very simple just using PyArray_[Check|FLAGS|SIZE|DATA]. I developed it on debian which was of course very straightforward, but now I need to deploy on windows, which is of course where the fun always begins.
I was unpleasantly surprised to discover that the numpy installers for window do not have an option to install the include files, which appear to be all that is needed to compile extensions that use numpy's C-api.
That would be a bug. They can't all be missing though, because I'm able to compile scipy against numpy installed with those installers without problems. Could you open an issue on Github and give details on which headers are missing where? Ralf
I have actually managed to copy my set of include files from linux and with a few modifications to _numpyconfig.h got my extension compiled and working.
Is there any chance that the includes could be included in future releases?
Thanks, Matt Newell _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
![](https://secure.gravatar.com/avatar/5dde29b54a3f1b76b2541d0a4a9b232c.jpg?s=120&d=mm&r=g)
I was unpleasantly surprised to discover that the numpy installers for
window do not have an option to install the include files, which appear to be all that is needed to compile extensions that use numpy's C-api.
That would be a bug. They can't all be missing though, because I'm able to compile scipy against numpy installed with those installers without problems.
agreed -- i have been compiling extensions against numpy on Windows with numpy from various binary installers for eyars -- never had a proble (with include file,s snaywa...) ARe you using: numpy.get_include() to get the location of the headers for that install? It should be in your setup.py file, something like: my_ext = Extension(.... include = [np.get_include()]. ....) -Chris -- 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.Barker@noaa.gov
![](https://secure.gravatar.com/avatar/62d2230ecc3f473201007d5385e339f8.jpg?s=120&d=mm&r=g)
On Friday, February 21, 2014 08:24:15 AM Chris Barker wrote:
I was unpleasantly surprised to discover that the numpy installers for
window do not have an option to install the include files, which appear to be all that is needed to compile extensions that use numpy's C-api.
That would be a bug. They can't all be missing though, because I'm able to compile scipy against numpy installed with those installers without problems.
agreed -- i have been compiling extensions against numpy on Windows with numpy from various binary installers for eyars -- never had a proble (with include file,s snaywa...)
ARe you using:
numpy.get_include()
Thank you, problem solved! Header files are indeed installed and there is no bug to report. I only assumed that the header files weren't installed because I couldn't find them in the include dir inside the python installation, and the installer gave no options. I'm not well versed in the normal system for compiling and distributing python extensions because my extensions are using SIP as they are heavily integrated with Qt/PyQt. Thanks, Matt Newell
participants (3)
-
Chris Barker
-
Matt Newell
-
Ralf Gommers