Linux下Python3.5使用pyqt5.11报错 ImportError: /usr/local/lib/python3.5/dist-packages/PyQt5/QtCore.so: undefined symbol: PySlice_AdjustIndices 解决方法

我这个Linux自带的是Python3.5版本,运行pip3 install PyQt5, 下载的是PyQt5.11,运行PyQt5程序会报错:

ImportError: /usr/local/lib/python3.5/dist-packages/PyQt5/QtCore.so: undefined symbol: PySlice_AdjustIndices

删除PyQt5.11

pip3 uninstall PyQt5

重新安装PyQt5.10版本,就没有错误了

pip3 install "PyQt5<5.11"

另外网上有人说升级到Python3.6就没有这个问题了,这个方法还没测试过。

猜你喜欢

转载自www.cnblogs.com/Yinkaisheng/p/9714536.html