一、pip國內鏡像源加速
pip國內的一些鏡像
阿里雲 http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/
中國科學技術大學 http://pypi.mirrors.ustc.edu.cn/simple/
修改源方法:
臨時使用:
可以在使用pip的時候在后面加上-i參數,指定pip源
eg: pip install scrapy -i https://pypi.tuna.tsinghua.edu.cn/simple
永久修改:
linux:
修改 ~/.pip/pip.conf (沒有就創建一個), 內容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
windows:
直接在user目錄中創建一個pip目錄,如:C:\Users\xx\pip,新建文件pip.ini,內容如下
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
(虛擬環境目錄)venv\Lib\site-packages\pip-10.0.1-py3.7.egg\pip\_internal\models\index.py
PyPI = Index('https://pypi.douban.com/')
二、安裝pyqt5,pyqt5-tools,PyQt5-stubs
pip install pyqt5 -i https://pypi.tuna.tsinghua.edu.cn/simple # 目的是安裝designer.exe pip install pyqt5-tools -i https://pypi.tuna.tsinghua.edu.cn/simple # 解決pycharm的pyqt5智能語法檢測問題 pip install PyQt5-stubs -i https://pypi.tuna.tsinghua.edu.cn/simple
打開pycharn的Settings\Tools\External Tools,添加外部工具(+)
Name : Qt_Designer Group : Qt5 Programe : D:\pyProject\qt5\venv\Lib\site-packages\pyqt5_tools\Qt\bin\designer.exe Working directory : $FileDir$ # Qt界面 轉換成 py代碼 Name : Qt_Pyuic Group : Qt5 Programe : D:\pyProject\qt5\venv\Scripts\pyuic5.exe Arguments : $FileName$ -o $FileNameWithoutExtension$.py Working directory : $FileDir$ # 資源文件轉換成py文件,並在主程序引 Name : Qt_Pyrcc Group : Qt5 Programe : D:\pyProject\qt5\venv\Scripts\pyrcc5.exe Arguments : $FileName$ -o $FileNameWithoutExtension$_rc.py Working directory : $FileDir$
pyrcc: https://www.cnblogs.com/hester/p/11205858.html
學習資源:
官方文檔:http://zetcode.com/gui/pyqt5/
gitbook翻譯部分文檔: https://maicss.gitbooks.io/pyqt5/content/hello_world.html
Archi博客園 :https://www.cnblogs.com/archisama/p/5442071.html
圖形界面編程 學點編程吧:https://mp.weixin.qq.com/s/Wy1iTYoX7_O81ChMflXXfg
簡要教程,主要是designer:http://www.1118pc.com/show_pdetails.asp?id=918