table of Contents
Python currently supports all major operating systems, comes with Python environment on Linux, Unix and Mac (but recommended that the system comes Python2. + Updated to version Python3. + Version), on a Windows system, you need to install it, super-simple .
Windows System
Open official website https://www.python.org/downloads/windows/ Download Center to download the corresponding version of the computer (recommended download executable version), all the way next select custom.
Adding Environment Variables
At the command prompt box (cmd):
- Enter
path=%path%;C:\Python
Press "Enter". Note: D: \ There python.exe files in Python, that is, Python download path - Enter
path=%path%;C:\Python\Scripts
Press "Enter". Note: D: \ Python \ have pip.exe file within Scripts.
You can also set the following ways:
- Right-click on "Computer" and then click "Properties"
- Then click on the "Advanced System Settings"
- Select "System Variables" window under the "Path", double click!
- Then in the "Path" line, add python.exe and pip.exe path to (my D: \ Python and D: \ Python \ Scripts), so in the back, add the path. ps: Remember, the direct path with a semicolon ";" to separate! If you are new to Windows10 directly.
- After the last set successfully, the cmd command line, enter the command "python", you can have associated display.
Mac system
Open official website https://www.python.org/downloads/windows/ Download Center to download the corresponding version of the computer (recommended download executable version), all the way next select custom.
Adding Environment Variables
In the terminal, sequentially input:
vim ~/.bash_profile
export PATH=/usr/local/Python/bin:$PATH # Python安装路径
Ese+:wq # 保存文件
source ~/.bash_profile