infoblox-client
infoblox-client copied to clipboard
Installation of infoblox-client with python3.11 via pip fails because of netifaces module
RHEL9.2 introduces python3.11 and ansible uses python3.11 as default python interpreter after that. Installing infoblox-client via pip-3.11 leads to an error regarding the dependent "netifaces" module and fails to install.
I also tried to install with specific setuptools mentioned in another issue here (setuptools==58.1.0)
Error:
shell# pip3.11 install infoblox-client
Defaulting to user installation because normal site-packages is not writeable
Collecting infoblox-client
Using cached infoblox_client-0.6.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.11.0 in /usr/lib/python3.11/site-packages (from infoblox-client) (1.16.0)
Collecting requests>=2.5.2
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Collecting urllib3>=1.13
Using cached urllib3-2.0.2-py3-none-any.whl (123 kB)
Collecting oslo.serialization>=1.4.0
Using cached oslo.serialization-5.1.1-py3-none-any.whl (25 kB)
Collecting oslo.log>=1.8.0
Using cached oslo.log-5.2.0-py3-none-any.whl (71 kB)
Requirement already satisfied: setuptools>=17.1 in /home/username/.local/lib/python3.11/site-packages (from infoblox-client) (58.1.0)
Collecting debtcollector>=1.19.0
Using cached debtcollector-2.5.0-py3-none-any.whl (23 kB)
Collecting oslo.config>=5.2.0
Using cached oslo.config-9.1.1-py3-none-any.whl (128 kB)
Collecting oslo.context>=2.21.0
Using cached oslo.context-5.1.1-py3-none-any.whl (20 kB)
Collecting oslo.i18n>=3.20.0
Using cached oslo.i18n-6.0.0-py3-none-any.whl (46 kB)
Collecting oslo.utils>=3.36.0
Using cached oslo.utils-6.1.0-py3-none-any.whl (100 kB)
Collecting pbr>=3.1.1
Using cached pbr-5.11.1-py2.py3-none-any.whl (112 kB)
Collecting python-dateutil>=2.7.0
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Requirement already satisfied: pyinotify>=0.9.6 in /home/username/.local/lib/python3.11/site-packages (from oslo.log>=1.8.0->infoblox-client) (0.9.6)
Collecting msgpack>=0.5.2
Using cached msgpack-1.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (325 kB)
Requirement already satisfied: pytz>=2013.6 in /home/username/.local/lib/python3.11/site-packages (from oslo.serialization>=1.4.0->infoblox-client) (2023.3)
Collecting charset-normalizer<4,>=2
Using cached charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (197 kB)
Collecting idna<4,>=2.5
Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
Using cached certifi-2023.5.7-py3-none-any.whl (156 kB)
Collecting wrapt>=1.7.0
Using cached wrapt-1.15.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (78 kB)
Requirement already satisfied: PyYAML>=5.1 in /usr/lib64/python3.11/site-packages (from oslo.config>=5.2.0->oslo.log>=1.8.0->infoblox-client) (6.0)
Requirement already satisfied: netaddr>=0.7.18 in /home/username/.local/lib/python3.11/site-packages (from oslo.config>=5.2.0->oslo.log>=1.8.0->infoblox-client) (0.8.0)
Collecting rfc3986>=1.2.0
Using cached rfc3986-2.0.0-py2.py3-none-any.whl (31 kB)
Collecting stevedore>=1.20.0
Using cached stevedore-5.1.0-py3-none-any.whl (49 kB)
Collecting iso8601>=0.1.11
Using cached iso8601-1.1.0-py3-none-any.whl (9.9 kB)
Collecting netifaces>=0.10.4
Using cached netifaces-0.11.0.tar.gz (30 kB)
Preparing metadata (setup.py) ... done
Collecting packaging>=20.4
Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting pyparsing>=2.1.0
Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Building wheels for collected packages: netifaces
Building wheel for netifaces (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
running bdist_wheel
running build
running build_ext
checking for getifaddrs...found.
checking for getnameinfo...found.
checking for IPv6 socket IOCTLs...not found.
checking for optional header files...netash/ash.h netatalk/at.h netax25/ax25.h neteconet/ec.h netipx/ipx.h netpacket/packet.h netrose/rose.h linux/atm.h linux/llc.h linux/tipc.h linux/dn.h.
checking whether struct sockaddr has a length field...no.
checking which sockaddr_xxx structs are defined...at ax25 in in6 ipx un rose ash ec ll atmpvc atmsvc dn llc.
checking for routing socket support...no.
checking for sysctl(CTL_NET...) support...no.
checking for netlink support...yes.
will use netlink to read routing table
gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DNETIFACES_VERSION=0.11.0 -DHAVE_GETIFADDRS=1 -DHAVE_GETNAMEINFO=1 -DHAVE_NETASH_ASH_H=1 -DHAVE_NETATALK_AT_H=1 -DHAVE_NETAX25_AX25_H=1 -DHAVE_NETECONET_EC_H=1 -DHAVE_NETIPX_IPX_H=1 -DHAVE_NETPACKET_PACKET_H=1 -DHAVE_NETROSE_ROSE_H=1 -DHAVE_LINUX_ATM_H=1 -DHAVE_LINUX_LLC_H=1 -DHAVE_LINUX_TIPC_H=1 -DHAVE_LINUX_DN_H=1 -DHAVE_SOCKADDR_AT=1 -DHAVE_SOCKADDR_AX25=1 -DHAVE_SOCKADDR_IN=1 -DHAVE_SOCKADDR_IN6=1 -DHAVE_SOCKADDR_IPX=1 -DHAVE_SOCKADDR_UN=1 -DHAVE_SOCKADDR_ROSE=1 -DHAVE_SOCKADDR_ASH=1 -DHAVE_SOCKADDR_EC=1 -DHAVE_SOCKADDR_LL=1 -DHAVE_SOCKADDR_ATMPVC=1 -DHAVE_SOCKADDR_ATMSVC=1 -DHAVE_SOCKADDR_DN=1 -DHAVE_SOCKADDR_LLC=1 -DHAVE_PF_NETLINK=1 -I/usr/include/python3.11 -c netifaces.c -o build/temp.linux-x86_64-3.11/netifaces.o
netifaces.c:1:10: fatal error: Python.h: No such file or directory
1 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for netifaces
Running setup.py clean for netifaces
Failed to build netifaces
Installing collected packages: netifaces, msgpack, wrapt, urllib3, rfc3986, python-dateutil, pyparsing, pbr, packaging, iso8601, idna, charset-normalizer, certifi, stevedore, requests, oslo.i18n, debtcollector, oslo.utils, oslo.context, oslo.config, oslo.serialization, oslo.log, infoblox-client
Running setup.py install for netifaces ... error
error: subprocess-exited-with-error
× Running setup.py install for netifaces did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
running install
running build
running build_ext
checking for getifaddrs...found.
checking for getnameinfo...found.
checking for IPv6 socket IOCTLs...not found.
checking for optional header files...netash/ash.h netatalk/at.h netax25/ax25.h neteconet/ec.h netipx/ipx.h netpacket/packet.h netrose/rose.h linux/atm.h linux/llc.h linux/tipc.h linux/dn.h.
checking whether struct sockaddr has a length field...no.
checking which sockaddr_xxx structs are defined...at ax25 in in6 ipx un rose ash ec ll atmpvc atmsvc dn llc.
checking for routing socket support...no.
checking for sysctl(CTL_NET...) support...no.
checking for netlink support...yes.
will use netlink to read routing table
gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DNETIFACES_VERSION=0.11.0 -DHAVE_GETIFADDRS=1 -DHAVE_GETNAMEINFO=1 -DHAVE_NETASH_ASH_H=1 -DHAVE_NETATALK_AT_H=1 -DHAVE_NETAX25_AX25_H=1 -DHAVE_NETECONET_EC_H=1 -DHAVE_NETIPX_IPX_H=1 -DHAVE_NETPACKET_PACKET_H=1 -DHAVE_NETROSE_ROSE_H=1 -DHAVE_LINUX_ATM_H=1 -DHAVE_LINUX_LLC_H=1 -DHAVE_LINUX_TIPC_H=1 -DHAVE_LINUX_DN_H=1 -DHAVE_SOCKADDR_AT=1 -DHAVE_SOCKADDR_AX25=1 -DHAVE_SOCKADDR_IN=1 -DHAVE_SOCKADDR_IN6=1 -DHAVE_SOCKADDR_IPX=1 -DHAVE_SOCKADDR_UN=1 -DHAVE_SOCKADDR_ROSE=1 -DHAVE_SOCKADDR_ASH=1 -DHAVE_SOCKADDR_EC=1 -DHAVE_SOCKADDR_LL=1 -DHAVE_SOCKADDR_ATMPVC=1 -DHAVE_SOCKADDR_ATMSVC=1 -DHAVE_SOCKADDR_DN=1 -DHAVE_SOCKADDR_LLC=1 -DHAVE_PF_NETLINK=1 -I/usr/include/python3.11 -c netifaces.c -o build/temp.linux-x86_64-3.11/netifaces.o
netifaces.c:1:10: fatal error: Python.h: No such file or directory
1 | #include <Python.h>
| ^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
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.
Any news? This breaks new installations of Ansible and the Infoblox Ansible Modules which are dependent on the infoblox-client package.
See https://github.com/infobloxopen/infoblox-client/issues/303
I don' t think infoblox has any interest in fixing this...
Hi @saruter
We are looking into the issue and will get back to you as soon as we have an update
Hi @saruter,
I created a Ubuntu machine 20.04 and tried to install Python 3.11 version using
link
And I was successful
And I installed Infoblox-client using pip3.11
Please try again and do let me know if the issue still occurs.
If you are on a RHEL-based OS (I am using fedora), you should be able to fix this by installing python3-devel
to get the header file reported as missing in the pip error output.
@ICOverdahl thank you. Doing a yum install python3.11-devel. solved this for us on a RHEL based OS.
@sarya-infoblox you might wanna look in making this requirement clearer, also I do see some deprecation warnings. Not sure how long infoblox-client is going to keep working.
DEPRECATION: infoblox-client is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559