Jump to content

Python Netifaces Install


DramaKing

Recommended Posts

I'm trying to install the python module netifaces to get Responder working, but there's no ipk package available and pip keeps failing.

root@mk7:~/Responder/netifaces# pip3 install netifaces
Collecting netifaces
  Using cached netifaces-0.11.0.tar.gz (30 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: netifaces
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  Building wheel for netifaces (setup.py) ... error
  ERROR: Failed building wheel for netifaces
  Running setup.py clean for netifaces
Failed to build netifaces
Installing collected packages: netifaces
  error: subprocess-exited-with-error

  × Running setup.py install for netifaces did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  Running setup.py install for netifaces ... error
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> netifaces

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

 

Link to comment
Share on other sites

29 minutes ago, dark_pyrro said:

First thing to try is to install gcc since the verbose output of the netifaces installation (pip3 install netifaces -vvv) complains about not finding gcc

opkg update
opkg install gcc

 

Thanks for the tip, but I already installed gcc to try cloning the repo and running the setup script.

root@mk7:~/Responder/netifaces# python3 setup.py install
running install
running bdist_egg
running egg_info
writing netifaces.egg-info/PKG-INFO
writing dependency_links to netifaces.egg-info/dependency_links.txt
writing top-level names to netifaces.egg-info/top_level.txt
reading manifest file 'netifaces.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'netifaces.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-mips/egg
running install_lib
running build_ext
checking for getifaddrs...not found. (cached)
checking for getnameinfo...not found. (cached)
checking for socket IOCTLs...not found. (cached)
checking for optional header files...none found. (cached)
checking whether struct sockaddr has a length field...no. (cached)
checking which sockaddr_xxx structs are defined...none! (cached)
checking for routing socket support...no. (cached)
checking for sysctl(CTL_NET...) support...no. (cached)
checking for netlink support...no. (cached)
building 'netifaces' extension
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/pineapple-firmware/build_dir/target-mipsel_24kc_musl/Python-3.9.7=Python-3.9.7 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/pineapple-firmware/build_dir/target-mipsel_24kc_musl/Python-3.9.7=Python-3.9.7 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -fmacro-prefix-map=/pineapple-firmware/build_dir/target-mipsel_24kc_musl/Python-3.9.7=Python-3.9.7 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -fno-inline -I/pineapple-firmware/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/include -I/pineapple-firmware/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include/fortify -I/pineapple-firmware/staging_dir/toolchain-mipsel_24kc_gcc-8.4.0_musl/include -fPIC -DNETIFACES_VERSION=0.11.0 -I/usr/include/python3.9 -c netifaces.c -o build/temp.linux-mips-3.9/netifaces.o
netifaces.c:1:10: fatal error: Python.h: No such file or directory
 #include <Python.h>
          ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1

 

Link to comment
Share on other sites

OK, there are other things you can try. I have netifaces running/working on my Mark VII.

Try updating already existing pip components (including pip itself):

pip3 install --upgrade pip
pip3 install --upgrade wheel
pip3 install --upgrade setuptools
or
pip3 install --upgrade pip setuptools wheel

python3-dev might be needed:

opkg update
opkg install python3-dev

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...