- changed status to resolved
cannot import name 'sip' from 'PyQt5' (Linux)
In some linux environments import sip fails.
refs to: https://github.com/qgis/QGIS/issues/45169
root@106cc5a953e7:/enmap-box# python3 scripts/setup_repository.py
setup repository
Application path not initialized
Traceback (most recent call last):
File "scripts/setup_repository.py", line 36, in <module>
setup_enmapbox_repository()
File "scripts/setup_repository.py", line 19, in setup_enmapbox_repository
from scripts.install_testdata import install_qgisresources, install_enmapboxtestdata
File "/enmap-box/scripts/install_testdata.py", line 8, in <module>
from enmapbox import URL_TESTDATA, URL_QGIS_RESOURCES, DIR_REPO
File "/enmap-box/enmapbox/__init__.py", line 430, in <module>
from enmapbox.gui.enmapboxgui import EnMAPBox
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 799, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/enmap-box/enmapbox/gui/__init__.py", line 4, in <module>
from ..externals.qps.plotstyling.plotstyling import PlotStyle, PlotStyleDialog, PlotStyleButton, PlotStyleWidget
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 799, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/enmap-box/enmapbox/externals/qps/plotstyling/plotstyling.py", line 40, in <module>
from ..externals import pyqtgraph as pg
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 799, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/enmap-box/enmapbox/externals/qps/externals/pyqtgraph/__init__.py", line 13, in <module>
from .Qt import QtCore, QtGui, mkQApp
File "/usr/lib/python3/dist-packages/qgis/utils.py", line 799, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "/enmap-box/enmapbox/externals/qps/externals/pyqtgraph/Qt/__init__.py", line 155, in <module>
from PyQt5 import sip, uic
ImportError: cannot import name 'sip' from 'PyQt5' (/usr/lib/python3/dist-packages/PyQt5/__init__.py)
Comments (17)
-
reporter -
When starting the EnMAP-Box, I now get an error, because of the missing SIP package.
-
-
assigned issue to
- changed version to 3.9
-
assigned issue to
-
reporter Please provide the error message
-
The bar is not showing anymore, but in the console I get:
Unable to import PyQt5-sip:
No module named 'PyQt5-sip'
D:\miniconda\envs\qgis\lib\importlib_bootstrap.py:219: RuntimeWarning: numpy.ndarray size changed, may indicate binary incompatibility. Expected 16 from C header, got 88 from PyObject
return f(*args, **kwds)
Unable to import PyQt5-sip: -
Is SIP not only for devs?
-
reporter - changed status to open
-
reporter - removed responsible
-
Like discussed, I removed the SIP from the requirements.txt
-
Regarding the initial problem with setup_enmapbox_repository: this is only relevant for developers I guess.
I can’t reproduce the error on my Win10 system.
-
Benjamin, can’t you fix the problemeatic import in your QPS module?
-
This bug needs to be resolved locally by the user. We’ll adress it under the FAQ & Troubleshooting section:
https://enmap-box.readthedocs.io/en/latest/general/faq_trouble.html#faq-troubleshooting -
- changed component to known issue
-
- changed status to on hold
-
- marked as blocker
-
addresses #718 sip import error
→ <<cset 25b06b5a0c98>>
-
- changed milestone to 3.9 (Hotfix)
- Log in to comment
added PyQt5-sip to requirements.txt resolves #718
Signed-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de
→ <<cset 69b715719185>>