安裝出現了點問題,最終解決了,借此記錄一下
1.安裝PyQt5
1.1搜索cmd,右鍵以管理員身份運行(可能我的目錄特殊,好多安裝都需要以管理員身份運行),
1.2 輸入安裝命令:pip install pyqt5 自動下載安裝
插句話...照着書上來的,裝了pyqt5配置外置工具designer.exe沒有,網上看了下別人裝pyqt5還帶裝了個pyqt-tools,所以我也打算裝下看看
上面很順利
2.安裝pyqt-tools
2.1 cmd窗口輸入pip install pyqt5-tools 自動下載安裝,這里總是下着下着斷了,網上找了個其他方法換地址下載安裝
2.2 cmd窗口輸入pip install pyqt5-tools -i https://pypi.douban.com/simple 自動下載安裝,安裝成功
2.3 測試,打開designer.exe 報錯,提示.dll文件缺失,貌似是 msvcp140_1.dll,解決辦法:下載 微軟常用運行庫合集
2.4 再次打開designer.exe ,還是出錯:提示內容:this application failed to start because no Qt platform plugin could be initialized. reinstalling the application may fix this problem.
解決辦法:
將文件夾下:C:\Users\admin\AppData\Local\Programs\Python\Python37\Lib\site-packages\pyqt5_tools\Qt\plugins\platforms 下的兩個文件:qminimal.dll和qwindows.dll
復制到: C:\Users\admin\AppData\Local\Programs\Python\Python37\Lib\site-packages\pyqt5_tools\Qt\bin\platforms 粘貼覆蓋 ,就是安裝pyqt_tools的目錄下的兩個目錄,各人有各人的路徑
2.5 測試,打開designer.exe,打開成功