Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

Install error #53

Open
tannn opened this issue Apr 22, 2018 · 4 comments
Open

Install error #53

tannn opened this issue Apr 22, 2018 · 4 comments

Comments

@tannn
Copy link

tannn commented Apr 22, 2018

When trying to install nnpy via pip3 or pip, we ran into this error:

    Installed /private/var/folders/3b/h9c7nf7x6_xgvy9yqb7xj8rh0000gn/T/pip-build-r14uxj7z/nnpy/.eggs/pycparser-2.18-py3.6.egg
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/3b/h9c7nf7x6_xgvy9yqb7xj8rh0000gn/T/pip-build-r14uxj7z/nnpy/setup.py", line 28, in <module>
        install_requires=['cffi'],
      File "/usr/local/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/local/lib/python3.6/site-packages/setuptools/dist.py", line 372, in __init__
        _Distribution.__init__(self, attrs)
      File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/distutils/dist.py", line 281, in __init__
        self.finalize_options()
      File "/usr/local/lib/python3.6/site-packages/setuptools/dist.py", line 528, in finalize_options
        ep.load()(self, ep.name, value)
      File "/private/var/folders/3b/h9c7nf7x6_xgvy9yqb7xj8rh0000gn/T/pip-build-r14uxj7z/nnpy/.eggs/cffi-1.11.5-py3.6-macosx-10.13-x86_64.egg/cffi/setuptools_ext.py", line 204, in cffi_modules
        add_cffi_module(dist, cffi_module)
      File "/private/var/folders/3b/h9c7nf7x6_xgvy9yqb7xj8rh0000gn/T/pip-build-r14uxj7z/nnpy/.eggs/cffi-1.11.5-py3.6-macosx-10.13-x86_64.egg/cffi/setuptools_ext.py", line 49, in add_cffi_module
        execfile(build_file_name, mod_vars)
      File "/private/var/folders/3b/h9c7nf7x6_xgvy9yqb7xj8rh0000gn/T/pip-build-r14uxj7z/nnpy/.eggs/cffi-1.11.5-py3.6-macosx-10.13-x86_64.egg/cffi/setuptools_ext.py", line 25, in execfile
        exec(code, glob, glob)
      File "generate.py", line 120, in <module>
        ffi = create_module()
      File "generate.py", line 103, in create_module
        hfiles = header_files(set_source_args['include_dirs'])
      File "generate.py", line 28, in header_files
        return {fn: os.path.join(dir, fn) for fn in os.listdir(dir)
    FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/include/nanomsg'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/3b/h9c7nf7x6_xgvy9yqb7xj8rh0000gn/T/pip-build-r14uxj7z/nnpy/

We saw issue #52, which has a similar error, except we have tried to install on macOS, Ubuntu, and Windows 10. Each time we received this same error.

Any help would be appreciated.

@djc
Copy link
Member

djc commented Apr 23, 2018

Do you have nanomsg installed, including the headers? This code is effectively erroring out because it can't find the include directory for nanomsg. In this case, it looks like you're installing on macOS? By default the code looks for /usr/include/nanomsg/ and /usr/local/include/nanomsg, so if your nanomsg headers live somewhere else you have to customize something.

@sebitas0623
Copy link

the problem has been resolved? how?

@sebitas0623
Copy link

I have solved the problem installing manually the nanomsg library from https://github.com/nanomsg/nanomsg. First I clone the repository into the /usr/local/include and then I ran the command specified in the github. After that I could install the nnpy library.

@Marv-plc
Copy link

I run into the same problem on my raspberry pi zero setup as a mozilla-iot gateway.
I tried to install nanomsg via the following comands, which were suggested somewhere on the internet did not work:
sudo apt install libffi-dev libnanomsg4 libnanomsg-dev aso
(Error message: Unable to locate package libnanomsg4)
The steps describeded by sebitas0623 worked for me. Thanks a lot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants