我用Lubuntu 18.10 64位在我的电脑上安装了QGIS版本3.6。我有python 3.6.7和QT5.11.1。
一旦我运行QGIS,就会得到这个错误。
Couldn't load SIP module. Python support will be disabled.
Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3/dist-packages/qgis/__init__.py", line 72, in
from qgis.PyQt import QtCore File "/usr/lib/python3/dist-packages/qgis/PyQt/QtCore.py", line 26, in
from PyQt5.QtCore import * ImportError: /home/giacomo/.local/lib/python3.6/site-packages/PyQt5/QtCore.so: symbol _ZN23QOperatingSystemVersion11MacOSMojaveE version Qt_5 not defined in file libQt5Core.so.5 with link time reference
Python version:
3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0]
QGIS version:
3.6.1-Noosa 'Noosa', 93e761d
Python path: ['/usr/share/qgis/python', '/home/giacomo/.local/share/QGIS/QGIS3/profiles/default/python', '/home/giacomo/.local/share/QGIS/QGIS3/profiles/default/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/giacomo/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']如何安装与我的软件一起运行的SIP版本?
发布于 2019-12-04 17:16:55
在安装PyQt5之后,我在QGIS 3.4.13的Ubuntu18.04上遇到了这个问题。我没有将它放在虚拟环境中,因为我没有预料到会出现任何问题;它肯定是覆盖了PyQt4和sip的旧版本,因为有一个与PyQt5相关的特殊版本。我能够通过卸载PyQt5 5‘S sip (和PyQt5,可以总是在虚拟环境中正确地重新安装)来解决QGIS的问题,然后在整个sip系统范围内重新安装(在QGIS查找它的环境中)。
在下面的示例中,我确保使用Python3 pip,因为我的系统中有Python2和3。
sudo -H pip3 uninstall PyQt5-sip
sudo -H pip3 uninstall PyQt5
# This seems to be the Python package QGIS requires
sudo -H pip3 install siphttps://unix.stackexchange.com/questions/511250
复制相似问题