pyqtdeploy reports: AttributeError: module 'importlib' has no attribute 'util'
Phil Thompson
phil at riverbankcomputing.com
Wed Dec 2 16:24:48 GMT 2020
On 02/12/2020 16:17, Frans Fürst wrote:
> 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?
It's fixed in the current snapshot.
Phil
More information about the PyQt
mailing list