记录一次安装pip包报错的问题(This error originates from a subprocess, and is likely not a problem with pip. )

环境: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==,看下目前需要有哪些版本可以装。然后从高到低逐个版本尝试安装。

你可能感兴趣的:(python,数学建模)