網站首頁 編程語言 正文
本文所使用的環境是 windows10 + python3.11 + vscode
1. 設置pip鏡像源地址
由于pip默認使用的是國外的源,所以使用pip install的時候速度會特別慢。我們可以更換pip的鏡像源地址來提速,例如:
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple/
pip config set install.trusted-host mirrors.aliyun.com
# pip國內鏡像源, 選擇一個合適的即可:
# 阿里云 http://mirrors.aliyun.com/pypi/simple/
# 中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
# 豆瓣 http://pypi.douban.com/simple
# Python官方 https://pypi.python.org/simple/
# v2ex http://pypi.v2ex.com/simple/
# 中國科學院 http://pypi.mirrors.opencas.cn/simple/
# 清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/
2. 安裝PyQt5
最簡單的方法就是直接使用pip進行安裝,這一步一般不會有什么問題
pip install PyQt5
?3. 安裝QT Designer
由于Qt Designer已經在Python3.5版本從PyQt5轉移到了tools,因此我們還需要安裝pyqt5-tools
pip install pyqt5-tools
這一步有的同學會出問題,需要注意的是,如果使用的python版本是python10及以上,那么安裝pyqt5-tools會失敗,目前PyQt5能在python3.10 環境安裝的成功的版本是5.15.6 , 而pyqt5-tools的最新版本是:pyqt5-tools 5.15.4.3.2,因為python3.10只能安pyqt5 5.15.6,這就限制了pyqt5-tools安裝會失敗,最簡單的辦法是降低python的版本到3.9或3.8!
另外,安裝pyqt6也一樣解決不了,已經嘗試過。
以下是Python3.11安裝報錯的示例:
因為安裝pyqt5-tools就是為了用PyQt5Designer,目的是為了設計軟件界面更方便,所以如果我們想使用python高版本,并且又希望使用PyQt5Designer的話,其實我們可以直接安裝PyQt5Designer。
pip install PyQt5Designer
安裝完成后,所在路徑為"python安裝目錄\Lib\site-packages\QtDesigner", 雙擊即可打開designer.exe
原文鏈接:https://blog.csdn.net/hubing_hust/article/details/127827669
相關推薦
- 2024-03-18 bootstrap application 和 nacos 中配置文件的優先級
- 2022-07-06 R語言可視化開發forestplot根據分組設置不同顏色_R語言
- 2022-08-04 Python?threading和Thread模塊及線程的實現_python
- 2022-08-28 go?zero微服務實戰處理每秒上萬次的下單請求_Golang
- 2022-07-14 Nginx限流和黑名單配置的策略_nginx
- 2022-05-12 C++線程安全的隊列你了解嘛_C 語言
- 2022-07-07 一篇文章讀懂nginx的gzip_static模塊_nginx
- 2023-01-08 Android?Application的使用全面解析_Android
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支