进入官网
在你常用的搜索引擎中输入 python官网 然后进入。文章源自随机的未知-https://sjdwz.com/11158.html
可直接点击本链接文章源自随机的未知-https://sjdwz.com/11158.html
python官网进入;文章源自随机的未知-https://sjdwz.com/11158.html
也可在浏览器地址栏输入www.python.org回车进入官网。文章源自随机的未知-https://sjdwz.com/11158.html
下载
将鼠标放到菜单栏中的 Downloads处;文章源自随机的未知-https://sjdwz.com/11158.html
然后根据自己操作系统的不同点击相应的栏目。文章源自随机的未知-https://sjdwz.com/11158.html
我的是windows系统,所以点击的是windows。文章源自随机的未知-https://sjdwz.com/11158.html
进入如下界面文章源自随机的未知-https://sjdwz.com/11158.htmlimage-20220225193531957
按照自己系统的位数进行下载,32位的选第一个,64位选第二个。文章源自随机的未知-https://sjdwz.com/11158.html
安装
找到刚刚下载好的文件文章源自随机的未知-https://sjdwz.com/11158.html
运行文章源自随机的未知-https://sjdwz.com/11158.html
注意勾选上ANd Python 3.9 to PATH 不然要自己去创建环境变量。文章源自随机的未知-https://sjdwz.com/11158.html
如果忘记勾选了,看下面的为python建立环境变量。文章源自随机的未知-https://sjdwz.com/11158.html
InStall Now选项是默认安装文章源自随机的未知-https://sjdwz.com/11158.html
Customize installation选项是自定义安装文章源自随机的未知-https://sjdwz.com/11158.html
我们选自定义安装文章源自随机的未知-https://sjdwz.com/11158.html
默认全选就好文章源自随机的未知-https://sjdwz.com/11158.html
点击Next文章源自随机的未知-https://sjdwz.com/11158.html
按照如下选择文章源自随机的未知-https://sjdwz.com/11158.html
注意这里的路径改成自己的文章源自随机的未知-https://sjdwz.com/11158.html
Add Python to environment variables 也是将python加入环境变量的意思,如果没勾选,需要自己配置环境变量。文章源自随机的未知-https://sjdwz.com/11158.html
然后点击Install文章源自随机的未知-https://sjdwz.com/11158.html
等待片刻,出现如下界面文章源自随机的未知-https://sjdwz.com/11158.html
就安装好了文章源自随机的未知-https://sjdwz.com/11158.html
验证是否安装成功
打开cmd窗口或者power shell,输入python,回车,如果出现如下界面,便安装成功了。文章源自随机的未知-https://sjdwz.com/11158.html
如果未出现,继续看下面的配置环境变量。文章源自随机的未知-https://sjdwz.com/11158.html
配置环境变量

右键文章源自随机的未知-https://sjdwz.com/11158.html
选择属性文章源自随机的未知-https://sjdwz.com/11158.html
选择高级系统设置文章源自随机的未知-https://sjdwz.com/11158.html
高级下面的环境变量文章源自随机的未知-https://sjdwz.com/11158.html
双击这一项文章源自随机的未知-https://sjdwz.com/11158.html
把你刚才的安装python的路径和pip的路径(pip.exe的位置,一般是python安装位置的Scripts文件夹,如果不配置这个,后面用pip安装库的时候会报错)以英文分号隔开输入进去(如果前面有字符,也要用英文的分号隔开)文章源自随机的未知-https://sjdwz.com/11158.html
如文章源自随机的未知-https://sjdwz.com/11158.html
我的python安装路径是D:\python文章源自随机的未知-https://sjdwz.com/11158.html
那么我的pip路径是文章源自随机的未知-https://sjdwz.com/11158.html
D:\python\Scripts文章源自随机的未知-https://sjdwz.com/11158.html
我们把 ;D:\python ;D:\pythonl\Scripts文章源自随机的未知-https://sjdwz.com/11158.html
加入到后面文章源自随机的未知-https://sjdwz.com/11158.html
注意前面都有分号文章源自随机的未知-https://sjdwz.com/11158.html
点击确定文章源自随机的未知-https://sjdwz.com/11158.html
这里的确定也要点文章源自随机的未知-https://sjdwz.com/11158.html
完成
如上就完成了python的安装。文章源自随机的未知-https://sjdwz.com/11158.html