问题描述
我刚刚在我的 windows 系统上安装了带有 python 3.6 的 anaconda 5.2.还通过具有管理员权限的 pip 安装了 pyqt5 和 pyqt5-tools.现在,当我运行 pyuic5.exe 来转换 ui 文件时,它显示以下错误:
i have just installed anaconda 5.2 with python 3.6 on my windows system. also installed pyqt5 and pyqt5-tools via pip with *****istrator privilege. now when i run pyuic5.exe for converting ui files it shows following error:
traceback (most recent call last): file "c:usersashfaqurrahmananaconda3libunpy.py", line 193, in _run_module_as_main "__main__", mod_spec) file "c:usersashfaqurrahmananaconda3libunpy.py", line 85, in _run_code exec(code, run_globals) file "c:usersashfaqurrahmanappdataroamingpythonpython36site-packagespyqt5uicpyuic.py", line 26, infrom pyqt5 import qtcore modulenotfounderror: no module named 'pyqt5.sip'
我尝试使用 pip 安装 pyqt5-sip 包.但是它已经安装在我的系统中了.
i have tried installing pyqt5-sip package using pip. buts its already installed in my system.
为什么会出现这个问题?我该如何解决这个问题?
why this problem is occurring? how can i solve this problem?
推荐答案
根据agile_eagle的建议来自我刚刚卸载了 pyqt5 和 pyqt5-tools 软件包并重新安装了它们的评论.问题解决了!
according to agile_eagle's suggestion from the comments i just uninstalled pyqt5 and pyqt5-tools packages and the reinstalled them. problem solved!
ps.:如果您仍然遇到 pyqt 问题,请尝试卸载所有 pyqt 相关库:
ps.: if you still got problems with pyqt, try uninstalling all of the pyqt related libraries:
pip uninstall pyqt5 pip uninstall pyqt5-sip pip uninstall pyqtwebengine
然后重新安装它们,这将修复:
then install them again, this will fix:
modulenotfounderror: no module named 'pyqt5.sip' modulenotfounderror: no module named 'pyqt5.qtwebenginewidgets'
pps.:如果您在卸载库时遇到问题,请转到您的 python 文件夹,例如 c:users
pps.:if you got problems uninstalling the libraries, go to your python folder, like c:users