环境:centos 6.5 python3.8.0
安装报错的包:
#autobahn==23.1.2
#cryptography==40.0.1
#daphne==4.0.0
#mysqlclient==2.1.1
#service-identity==21.1.0
#pyOpenSSL==23.1.1
安装上面包报错如下:
twisted_iocpsupport/iocpsupport.c: In function ‘__pyx_pymod_exec_iocpsupport’:
twisted_iocpsupport/iocpsupport.c:8148: warning: implicit declaration of function ‘initWinsockPointers’
twisted_iocpsupport/iocpsupport.c:8177: error: ‘lpConnectEx’ undeclared (first use in this function)
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 twisted-iocpsupport
Failed to build twisted-iocpsupport
ERROR: Could not build wheels for twisted-iocpsupport, which is required to install pyproject.toml-based projects
解决:
原因是包版本不兼容。需要降版本安装。
先执行:pip install autobahn==,看下目前需要有哪些版本可以装。然后从高到低逐个版本尝试安装。
在CentOS6.5环境下,使用Python3.8.0尝试安装autobahn、cryptography、daphne、mysqlclient、service-identity和pyOpenSSL等包时发生错误,主要由于twisted-iocpsupport的编译失败,提示函数未声明和版本不兼容。解决方案是检查并降级这些包的版本,从高到低尝试安装,以找到适合当前环境的版本。
&spm=1001.2101.3001.5002&articleId=131175196&d=1&t=3&u=04faa44312404f0190ba686dee6c7345)
22万+

被折叠的 条评论
为什么被折叠?



