Ray-先生 发表于 2022-1-20 22:20:59

PyQT ImportError

我尝试把QT创建的UI文件用“pyuic5 -o ProgramKiller.py untitled.ui”转换成py文件时,引发了以下的错误
Traceback (most recent call last):
File "C:\users\administrator.desktop-t7q681r\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
File "C:\users\administrator.desktop-t7q681r\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
File "C:\Users\Administrator.DESKTOP-T7Q681R\AppData\Roaming\Python\Python39\Scripts\pyuic5.exe\__main__.py", line 4, in <module>
File "C:\Users\Administrator.DESKTOP-T7Q681R\AppData\Roaming\Python\Python39\site-packages\PyQt5\uic\pyuic.py", line 26, in <module>
    from PyQt5 import QtCore
ImportError: DLL load failed while importing QtCore: 找不到指定的模块。
求求各位大佬看看吧!

xiangjianshinan 发表于 2022-2-3 22:26:40

本帖最后由 xiangjianshinan 于 2022-2-3 22:59 编辑

https://static01.imgkr.com/temp/e6f75e4613ef4df9a944e665cb139b39.png

我用的是这样的,请尝试。或者把你这个pyui5的文件夹路径加入到环境变量上 ,再尝试。另外,你可以去哔哩哔哩这边找视频看看!


D:\mystation\python_xiangmu\xiangmutwo\venv\Scripts\python.exe

-m PyQt5.uic.pyuic$FileName$ -o $FileNameWithoutExtension$.py

$FileDir$

页: [1]
查看完整版本: PyQT ImportError