Installing the Python Interpreter
Python is a cross-platform language that currently has 2 of the mainstream. X and 3.X series versions, since the 3.X series is not compatible with the 2.X series, but today many programs and third-party libraries are based on the 2.X series, so we are mainly 2.X, the period will also be interspersed with some of the features of the 3.X. The first step in learning the programming language is helloword!. Then we need to install it first, you can choose to windows,mac,linux any system to learn it.
Under Windows:
First, download the latest version 2.7 from python.org, the official website of Python.
Then, run the download of the MSI installation package, in the selection of the installation components of the step, tick all the components, especially to pay attention to select and, and then all the way pip
Add python.exe to Path
"Next" to complete the installation. The default installation path is under the C:/python27 directory.
After the installation is complete:
Open cmd Command window, enter python-> carriage return, you can enter the Python command line smoothly.
If the error indicates that Python is not an internal or external command, is not a running program or batch file, and that Python does not include system variables, you need to manually set the system variables: My Computer –> Right-click Properties –> Advanced System settings –> environment variables > System variable –> Select the variable named path, click Edit –> Variable Value (V): plus; and installation path, such as; C://python27. Then enter the above statement.
Under Linux:
If you use Linux, you should have the ability to install the software. The CentOS system comes with version 2.6 or 2.7 and you can upgrade it yourself. Suppose we install the directory that is:/usr/local/python2.7
Also you need to add the Python path to the system environment variable:
In/etc/profile, add our Python path to the end of path:
Export/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin/:/usr/local/python/bin
Then execute Source/etc/profile
Or use a soft connection such as: Ln-s/usr/local/python2.7/usr/bin/python can be.
Under Mac:
If you are using a Mac, the system is OS X 10.8 or the latest 10.9 Mavericks, congratulations, the system comes with Python 2.7. If your system version is below 10.8, you can get Python 2.7 by backing up your system and upgrading to the latest 10.9 for free.