本文已参与「新人创作礼」活动,一起开启掘金创作之路。
由于网上资料比较分散,好多方案太老或已经失效,整理碰到错误,希望帮到大家
1、pip 安装pyqt5和tools速度过慢
问题描述:
pip3 install pyqt5 和pip3 install pyqt5-tools时,速度过慢,安装完成大概需要两个小时
解决方案:
使用国内镜像安装
pip3 install pyqt5 -i pypi.douban.com/simple
pip3 install pyqt5-tools -i pypi.douban.com/simple
2、designer.exe找不到问题
问题描述:
首先配置pycharm,designer.exe文件找不到,网上好多教程designer.exe,路径为python\Lib\site-packages\pyqt5_tools,
解决方案:
新版designer.exe位置没在此目录下,路径位于python安装目录下, ~\python\Lib\site-packages\pyqt5_tools\Qt\bin
3、QtDesigner启动失败(缺dll)
问题描述:
使用pycharm启动QtDesigner失败,也就是designer.exe启动失败,直接进入exe位于的文件路径,双击报错
由于找不到 VCRUNTIME140_1.dll,无法继续执行代码。。。我忘了截图,盗图,
解决方案:
见原博客:由于找不到VCRUNTIME140_1.dll,无法继续执行代码。重新安装程序可能会解决此问题_编程小龙的博客-CSDN博客_由于找不到vcruntime140_1.dll无法继续执行代码
安装windows插件,解决问题。
4、QtDesigner启动失败(no Qt platform)
问题描述:
启动designer.exe报错,报错信息如下。
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
解决方案:
网上解决方案很多,但是我尝试好用的且有道理的是这个
增加环境变量:QT_QPA_PLATFORM_PLUGIN_PATH
路径:E:\program\python\Lib\site-packages\pyqt5_tools\Qt\plugins
添加之后,报错解决