pyqtdeploy reports: AttributeError: module 'importlib' has no attribute 'util'

Frans F├╝rst frans.fuerst at protonmail.com
Wed Dec 2 16:17:12 GMT 2020


At least with Python v3.7.3 and 3.9.0 and on Fedora 33 and Debian 10 system running build-demo.py inside pyqtdeploy-3.1.0/demo gives me:

bash-5.0$ python3 build-demo.py
Traceback (most recent call last):
File "/usr/local/bin/pyqtdeploy-sysroot", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/pyqtdeploy/pyqtdeploysysroot_main.py", line 91, in main
specification = SysrootSpecification(specification_file)
File "/usr/local/lib/python3.9/site-packages/pyqtdeploy/sysroot/specification.py", line 87, in __init__
plugin = self._plugin_from_file(name, default_plugin_dir)
File "/usr/local/lib/python3.9/site-packages/pyqtdeploy/sysroot/specification.py", line 163, in _plugin_from_file
spec = importlib.util.spec_from_file_location(name, plugin_file)
AttributeError: module 'importlib' has no attribute 'util'

I can easily fix it by patching /usr/local/lib/python3.7/dist-packages/pyqtdeploy/sysroot/specification.py directly after installing pyqtdeploy:

FILE="/usr/local/lib/python3.7/dist-packages/pyqtdeploy/sysroot/specification.py"
awk '/import importlib/{print "import importlib.util"}1' "$FILE" > "${FILE}.temp"
mv "${FILE}.temp" "$FILE"

Is this a bug in pyqtdeploy or do I do anything wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20201202/641a6f47/attachment-0001.htm>


More information about the PyQt mailing list