tonysimpson / nanomsg-python

nanomsg wrapper for python with multiple backends (CPython and ctypes) should support 2/3 and Pypy
MIT License
382 stars 85 forks source link

_nanomsg_cpy/wrapper.c(4) : fatal error C1083: Cannot open include file: 'nanomsg/nn.h': No such file or directory #44

Open fandp opened 8 years ago

fandp commented 8 years ago

I try to run "python setup.py build" at windows7 command line, but an error happened: "_nanomsg_cpy/wrapper.c(4) : fatal error C1083: Cannot open include file: 'nanomsg/nn.h': No such file or directory."

The nanomsg is installed at C:\nanomsg, and I found the nn.h file is located at: C:\nanomsg\src

How can I let python konw the nanomsg path?

My enviroment is nanomsg-0.6-beta, python 3.4 32 bit, visual studio c++ express 2010, windows 7 64 bit.

Who can tell me how to do it? I'm a newer at python. thanks. Best Regards!

bnewbold commented 8 years ago

Hi @fandp,

Is nanomsg installed at C:\nanomsg or just downloaded/checked-out/extracted there? I'm not really sure how Windows installs work these days, but i'd expect there to be an include directory somewhere, not just src.

I think you need to add a --include-dirs argument to your python setup.py build command, which would point to an include directory (containing nanomsg/nn.h. You might also need a library_dirs variable set somewhere. See also: https://docs.python.org/2/distutils/configfile.html

codypiersall commented 7 years ago

PR #54 adds wheel building on Windows to this repository. You can download the wheels now if you want to: just click on your Python version, click on artifacts, download the wheel and you can pip install it.