Python learning notes Chapter 2: Installing python

Source: Internet
Author: User

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:

 
 
  1. 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.

 
 
  1. Wget http://python.org/ftp/python/2.6.6/Python-2.6.6.tar.bz2
  2. Tar jxvf Python-2.6.6.tar.bz2
  3. Cd Python-2.6.6
  4. ./Configure -- prefix =/usr ### specify the installation location
  5. Make
  6. Make install
  7. ### 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.