nanomsg / nnpy

cffi-based Python bindings for nanomsg
MIT License
117 stars 39 forks source link

pipenv install fails with python3.7 #56

Open sgluss opened 5 years ago

sgluss commented 5 years ago

env: Ubuntu 18.04

build works just fine with the built in python version 3.6.7

if I use this Pipfile:

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
nnpy = "*"

[requires]
python_version = "3.7"

I get the following error:

Creating a virtualenv for this project…
Pipfile: /home/sam/prj/sam/nanomsg/nnpy/Pipfile
Using /usr/bin/python3.7 (3.7.1) to create virtualenv…
⠹ Creating virtual environment...Using base prefix '/usr'
New python executable in /home/sam/.local/share/virtualenvs/nnpy-Zg0_5oAB/bin/python3.7
Also creating executable in /home/sam/.local/share/virtualenvs/nnpy-Zg0_5oAB/bin/python
Installing setuptools, pip, wheel...
done.
Running virtualenv with interpreter /usr/bin/python3.7

✔ Successfully created virtual environment! 
Virtualenv location: /home/sam/.local/share/virtualenvs/nnpy-Zg0_5oAB
Pipfile.lock (8e2049) out of date, updating to (938715)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✔ Success! 
Updated Pipfile.lock (8e2049)!
Installing dependencies from Pipfile.lock (8e2049)…
An error occurred while installing nnpy==1.4.2 --hash=sha256:52c1612f116294a7c87a27e49e027f3b55baefc9d279fbbf70e84d315d430ff9! Will try again.
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 3/3 — 00:00:01
Installing initially failed dependencies…
[pipenv.exceptions.InstallError]:   File "/home/sam/.local/lib/python3.6/site-packages/pipenv/core.py", line 1874, in do_install
[pipenv.exceptions.InstallError]:       keep_outdated=keep_outdated
[pipenv.exceptions.InstallError]:   File "/home/sam/.local/lib/python3.6/site-packages/pipenv/core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]:       pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]:   File "/home/sam/.local/lib/python3.6/site-packages/pipenv/core.py", line 859, in do_install_dependencies
[pipenv.exceptions.InstallError]:       retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[pipenv.exceptions.InstallError]:   File "/home/sam/.local/lib/python3.6/site-packages/pipenv/core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]:       _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]:   File "/home/sam/.local/lib/python3.6/site-packages/pipenv/core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]:       raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting nnpy==1.4.2 (from -r /tmp/pipenv-xtuwzjzr-requirements/pipenv-k_zvf7cp-requirement.txt (line 1))', '  Using cached https://files.pythonhosted.org/packages/23/20/490a767ad65f43e42d67766462336b8fee73fc34456ae1d15551f466332c/nnpy-1.4.2.tar.gz', 'Building wheels for collected packages: nnpy', '  Building wheel for nnpy (setup.py): started', "  Building wheel for nnpy (setup.py): finished with status 'error'", '  Running setup.py clean for nnpy', 'Failed to build nnpy', 'Installing collected packages: nnpy', '  Running setup.py install for nnpy: started', "    Running setup.py install for nnpy: finished with status 'error'"]
[pipenv.exceptions.InstallError]: ['ERROR: Complete output from command /home/sam/.local/share/virtualenvs/nnpy-Zg0_5oAB/bin/python3.7 -u -c \'import setuptools, tokenize;__file__=\'"\'"\'/tmp/pip-install-ye_nd0ow/nnpy/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' bdist_wheel -d /tmp/pip-wheel-rxuplbux --python-tag cp37:', '  ERROR: running bdist_wheel', '  running build', '  running build_py', '  creating build', '  creating build/lib.linux-x86_64-3.7', '  creating build/lib.linux-x86_64-3.7/nnpy', '  copying nnpy/constants.py -> build/lib.linux-x86_64-3.7/nnpy', '  copying nnpy/errors.py -> build/lib.linux-x86_64-3.7/nnpy', '  copying nnpy/tests.py -> build/lib.linux-x86_64-3.7/nnpy', '  copying nnpy/__init__.py -> build/lib.linux-x86_64-3.7/nnpy', '  copying nnpy/socket.py -> build/lib.linux-x86_64-3.7/nnpy', '  warning: build_py: byte-compiling is disabled, skipping.', '  ', '  running build_ext', "  generating cffi module 'build/temp.linux-x86_64-3.7/_nnpy.c'", '  creating build/temp.linux-x86_64-3.7', "  building '_nnpy' extension", '  creating build/temp.linux-x86_64-3.7/build', '  creating build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7', '  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/nanomsg -I/usr/local/include/nanomsg -I/usr/include/python3.7m -I/home/sam/.local/share/virtualenvs/nnpy-Zg0_5oAB/include/python3.7m -c build/temp.linux-x86_64-3.7/_nnpy.c -o build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_nnpy.o', '  build/temp.linux-x86_64-3.7/_nnpy.c:22:12: fatal error: pyconfig.h: No such file or directory', '   #  include <pyconfig.h>', '              ^~~~~~~~~~~~', '  compilation terminated.', "  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1", '  ----------------------------------------', '  ERROR: Failed building wheel for nnpy', '    ERROR: Complete output from command /home/sam/.local/share/virtualenvs/nnpy-Zg0_5oAB/bin/python3.7 -u -c \'import setuptools, tokenize;__file__=\'"\'"\'/tmp/pip-install-ye_nd0ow/nnpy/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record /tmp/pip-record-7f55kquw/install-record.txt --single-version-externally-managed --compile --install-headers /home/sam/.local/share/virtualenvs/nnpy-Zg0_5oAB/include/site/python3.7/nnpy:', '    ERROR: running install', '    running build', '    running build_py', '    creating build', '    creating build/lib.linux-x86_64-3.7', '    creating build/lib.linux-x86_64-3.7/nnpy', '    copying nnpy/constants.py -> build/lib.linux-x86_64-3.7/nnpy', '    copying nnpy/errors.py -> build/lib.linux-x86_64-3.7/nnpy', '    copying nnpy/tests.py -> build/lib.linux-x86_64-3.7/nnpy', '    copying nnpy/__init__.py -> build/lib.linux-x86_64-3.7/nnpy', '    copying nnpy/socket.py -> build/lib.linux-x86_64-3.7/nnpy', '    warning: build_py: byte-compiling is disabled, skipping.', '    ', '    running build_ext', "    generating cffi module 'build/temp.linux-x86_64-3.7/_nnpy.c'", '    creating build/temp.linux-x86_64-3.7', "    building '_nnpy' extension", '    creating build/temp.linux-x86_64-3.7/build', '    creating build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7', '    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/nanomsg -I/usr/local/include/nanomsg -I/usr/include/python3.7m -I/home/sam/.local/share/virtualenvs/nnpy-Zg0_5oAB/include/python3.7m -c build/temp.linux-x86_64-3.7/_nnpy.c -o build/temp.linux-x86_64-3.7/build/temp.linux-x86_64-3.7/_nnpy.o', '    build/temp.linux-x86_64-3.7/_nnpy.c:22:12: fatal error: pyconfig.h: No such file or directory', '     #  include <pyconfig.h>', '                ^~~~~~~~~~~~', '    compilation terminated.', "    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1", '    ----------------------------------------', 'ERROR: Command "/home/sam/.local/share/virtualenvs/nnpy-Zg0_5oAB/bin/python3.7 -u -c \'import setuptools, tokenize;__file__=\'"\'"\'/tmp/pip-install-ye_nd0ow/nnpy/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' install --record /tmp/pip-record-7f55kquw/install-record.txt --single-version-externally-managed --compile --install-headers /home/sam/.local/share/virtualenvs/nnpy-Zg0_5oAB/include/site/python3.7/nnpy" failed with error code 1 in /tmp/pip-install-ye_nd0ow/nnpy/']
ERROR: ERROR: Package installation failed...
Alex-CodeLab commented 4 years ago

installs just fine on Python 3.7.3