hadiasghari / pyasn

Python IP address to Autonomous System Number lookup module. (Supports fast local lookups, and historical lookups using archived BGP dumps.)
Other
292 stars 72 forks source link

(Install/Upgrad)ing my pyasn via pip, failed in my oldstable/Jessie Debian v8. #49

Closed antdude closed 7 years ago

antdude commented 7 years ago

$ pip install --upgrade pyasn Collecting pyasn Using cached pyasn-1.6.0b1.tar.gz Building wheels for collected packages: pyasn Running setup.py bdist_wheel for pyasn ... error Complete output from command /home/ant/SopelPython3/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-35r70frq/pyasn/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/tmphmvt73kqpip-wheel- --python-tag cp34: running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.4 creating build/lib.linux-x86_64-3.4/pyasn copying pyasn/mrtx.py -> build/lib.linux-x86_64-3.4/pyasn copying pyasn/init.py -> build/lib.linux-x86_64-3.4/pyasn copying pyasn/_version.py -> build/lib.linux-x86_64-3.4/pyasn running build_ext building 'pyasn.pyasn_radix' extension creating build/temp.linux-x86_64-3.4 creating build/temp.linux-x86_64-3.4/pyasn creating build/temp.linux-x86_64-3.4/pyasn/_radix x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-35r70frq/pyasn/pyasn -I/usr/include/python3.4m -I/home/ant/SopelPython3/include/python3.4m -c pyasn/pyasn_radix.c -o build/temp.linux-x86_64-3.4/pyasn/pyasn_radix.o pyasn/pyasn_radix.c:39:20: fatal error: Python.h: No such file or directory

include "Python.h"

                  ^

compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1


Failed building wheel for pyasn Running setup.py clean for pyasn Failed to build pyasn Installing collected packages: pyasn Running setup.py install for pyasn ... error Complete output from command /home/ant/SopelPython3/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-35r70frq/pyasn/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-xjvl65cu-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ant/SopelPython3/include/site/python3.4/pyasn: running install running build running build_py creating build creating build/lib.linux-x86_64-3.4 creating build/lib.linux-x86_64-3.4/pyasn copying pyasn/mrtx.py -> build/lib.linux-x86_64-3.4/pyasn copying pyasn/init.py -> build/lib.linux-x86_64-3.4/pyasn copying pyasn/_version.py -> build/lib.linux-x86_64-3.4/pyasn running build_ext building 'pyasn.pyasn_radix' extension creating build/temp.linux-x86_64-3.4 creating build/temp.linux-x86_64-3.4/pyasn creating build/temp.linux-x86_64-3.4/pyasn/_radix x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-35r70frq/pyasn/pyasn -I/usr/include/python3.4m -I/home/ant/SopelPython3/include/python3.4m -c pyasn/pyasn_radix.c -o build/temp.linux-x86_64-3.4/pyasn/pyasn_radix.o pyasn/pyasn_radix.c:39:20: fatal error: Python.h: No such file or directory

include "Python.h"

                    ^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------

Command "/home/ant/SopelPython3/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-35r70frq/pyasn/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-xjvl65cu-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ant/SopelPython3/include/site/python3.4/pyasn" failed with error code 1 in /tmp/pip-build-35r70frq/pyasn/

Thank you in advance. :)

hadiasghari commented 7 years ago

Hi, you need to first install python-dev which includes python.h. See the readme for prerequisites.

antdude commented 7 years ago

Perfect and thanks. Was this python-dev requirement recently added? I never had to install it in the past.

hadiasghari commented 7 years ago

No it's always been there. On some systems the package is already installed, or some other package might have installed it as a dependency.

I'll close the issue. Cheers.

antdude commented 7 years ago

Interesting and thanks.