I remember that the last time I wrote python learning notes was three months ago. During this time, I saw and put it down. This time I had to stick to it and eat python.
This article is based on the concise Python tutorial and some of your own understandings. If you have any questions, please note.
I. Installation in Linux
If you are using a linux operating system, congratulations, you basically don't have to install python, because most linux operating systems have installed python by default when installing the system.
To test whether your system has python installed, run the following command:
- python -v
If the following python version information is displayed, you have installed python.
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/12255U2Z-0.jpg "/>
If you enter python-v and the returned value is bash: python: command not found, it means you have not installed it.
There are many installation methods:
You can run yum-y install python *
You can also use the rpm package to install and execute the python-x.x.x-x.rpm which of course requires you to install a lot of dependent packages.
You can also use the source code package for installation.
- Wget http://python.org/ftp/python/2.6.6/Python-2.6.6.tar.bz2
- Tar jxvf Python-2.6.6.tar.bz2
- Cd Python-2.6.6
- ./Configure -- prefix =/usr ### specify the installation location
- Make
- Make install
- ### Installation is complete in linux. ###
Ii. Installation in Windows
For windows users, You need to download python first. Different Versions of python vary depending on the operating system.
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/12255Rc0-1.jpg "/>
After the download is complete, it is an executable. msi file. Double-click the installation. By default, you can continue to the next step.
If you want a windows command prompt to call python, You need to modify the environment variable of the system.
My computer ---> properties ---> advanced system settings ---> environment variables ---> PATH ---> edit and paste the python installation directory to the end.
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/12255VR3-2.jpg "/>
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/12255V925-3.jpg "/>
Python installation ends here.
This article comes from "My future is not a dream ." Blog, please be sure to keep this source http://song49.blog.51cto.com/4480450/1070887