xrt
xrt copied to clipboard
ModuleNotFoundError: No module named 'PyQt5.QtWebKitWidgets'
Dear developers,
@stuartcampbell and I are observing building issues when using the xrt package with pyqt >5.6 in conda, see https://github.com/NSLS-II/lightsource2-recipes/pull/676#pullrequestreview-236908198 for the detailed log of the error ModuleNotFoundError: No module named 'PyQt5.QtWebKitWidgets'
. Are there any plans to support newer qt/pyqt versions?
Thank you! Maksim Rakitin
have you tried pip install PyQtWebEngine
?
You've made me check that we can actually work with the fresh pyqt versions, and the answer is positive on Windows 10, Kubuntu 18.10 and High Sierra, please see the screenshots below. In all three cases I used Anaconda, and on Windows 10 all the packages were the latest. So I suggest going through xrt.rtfd.io/instructions.html. Please report back on the progress/failures.
I can confirm that everything works fine on python 3.6.7 with qt 5.9.6, PyQt5 5.9.2 You could try to update your conda qt/pyqt installation as recommended here https://github.com/conda-forge/pyqt-feedstock/issues/19
@mrakitin: any progress on the issue?
Hi @kklmn, sorry for the late reply. No progress on that. I got stuck with conda-provided packages for PyQt5, not sure how to resolve it. pip packages seem to work though. I don't know if anything can be done on your side, e.g. using something else than QtWebKitWidgets
, or making it an optional import?
QtWebKitWidgets
is our second choice:
try:
import PyQt5.QtWebEngineWidgets as QtWeb
except ImportError:
import PyQt5.QtWebKitWidgets as QtWeb
It is expected that you have QtWebKitWidgets
only if you don't have QtWebEngineWidgets
.
Please do in a python session:
import PyQt5
import PyQt5.QtWebEngineWidgets
and provide the error message.
Actually, the problem appeared to be related to the missing libEGL.so.1
lib:
ImportError: libEGL.so.1: cannot open shared object file: No such file or directory
See the details at https://travis-ci.org/NSLS-II/lightsource2-recipes/jobs/587514703#L1022. Installing libegl1-mesa
in our Debian docker image (https://github.com/NSLS-II/debian-with-miniconda/pull/20) solved the problem.
The recipe was successfully build via:
- https://github.com/nsls-ii-forge/xrt-feedstock/pull/2 (Linux/OSX/Windows) in the
nsls2forge
conda channel; - https://github.com/NSLS-II/lightsource2-recipes/pull/676 (Linux) in the
lightsource2-tag
conda channel.
Do you want to make this recipe/package available on conda-forge? It would be trivial to create one as we already have a working recipe feedstock using their infrastructure.
I think this problem is resolved. Pending on your reply about the conda-forge.