(序)相关软件及安装说明
1. Python版本及安装
3.8及以下版本支持win7
3.9及以上版本只支持win10及以上系统
https://www.python.org/
2. Python pip源
默认源速度比较慢。
命令行修改法
(1)命令行临时修改法
在用pypi下载python包的时候,可以直接使用pip install packagename -i参数,指定下载源的URL
pip install ping3 -i https://pypi.tuna.tsinghua.edu.cn/simple
(2)命令行永久修改法
使用pip config set global.index-url来直接指定下载源的URL,这样就不用手动修改配置文件了
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
3.国内源URL分享
以下是国内互联网常用的pypi安装源URL,在国内互联网下载的速度非常
pypi 清华大学源:https://pypi.tuna.tsinghua.edu.cn/simple
pypi 腾讯源:http://mirrors.cloud.tencent.com/pypi/simple
pypi 阿里源:https://mirrors.aliyun.com/pypi/simple/
pypi 豆瓣源 :http://pypi.douban.com/simple/
4. VSCode配置python环境
https://blog.csdn.net/qq_40577131/article/details/112932251
5. Pycharm安装教程
https://blog.csdn.net/qiqi1220/article/details/121671381
(一 )Python Qt 简介
1. 安装 PySide2
pip install pyside2 -i https://pypi.douban.com/simple/
建议:如果你的程序要发布给客户使用,建议使用32位的Python解释器,这样打包发布的exe程序可以兼容32位的Windows
2. 安装 PyQt5
pip install pyqt5-tools
即可同时安装 PyQt5 和 一些重要的工具,比如 Qt designer。
一个小例子:
from PySide2.QtWidgets import QApplication, QMainWindow, QPushButton, QPlainTextEdit,QMessageBox
class Stats():
def __init__(self):
self.window = QMainWindow()
self.window.resize(500, 400)
self.window.move(300, 300)
self.window.setWindowTitle('薪资统计')
self.textEdit = QPlainTextEdit(self.window)
self.textEdit.setPlaceholderText("请输入薪资表")
self.textEdit.move(10, 25)
self.textEdit.resize(300, 350)
self.button = QPushButton('统计', self.window)
self.button.move(