一、下載
下載地址:https://www.python.org/downloads/windows/
Download Windows x86 web-based installer
Download Windows x86 executable installer
Download Windows x86 embeddable zip file
Download Windows x86-64 web-based installer
Download Windows x86-64 executable installer
Download Windows x86-64 embeddable zip file
Download Windows help file
上述各版本的區別:
x86適合32位操作系統,x86-64適合64位操作系統;
web-based installer 是需要通過聯網完成安裝的;
executable installer 是可執行文件(*.exe)方式安裝;
embeddable zip file 嵌入式版本,可以集成到其它應用中。
二、安裝
選擇安裝下載包,選定一路next。
三、設置環境變量
右鍵“我的電腦”選擇“屬性”,選擇“高級系統配置”,點擊“高級”,點擊“環境變量”,選擇“path”,把python的安裝目錄添加到path系統變量中即可。
我的目錄是:E:\Program Files (x86)\AppData\Local\Programs\Python\Python36-32
四、測試python安裝是否成功,cmd打開命令行輸入 python 命令
D:\Users\mycomp>python
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
五、Hello World! 按照很多資料上寫的,輸入 print ('Hello World!')
>>> print ('Hello World!')
Hello World!
>>>