0 Basic Python (i) Python environment installation

Source: Internet
Author: User
Any high-level language requires a programming environment of its own, which is like writing, requiring paper and pens, writing on a computer, and having word-processing software, such as office of various names. Pen and paper, and Office software, is the hardware or software that writes things, in short, those words can only be written on that top, in order to finally become an article. So programming is also, to have a program and so on, to write the program on that, in order to form the last thing like the article.

Just now there is a term-"program", What is a program? This article will not talk about. If the audience is not very understanding the word, please go to Google on the Internet.

Note: A very important learning method is recommended.

Don't expect to learn a lot of advanced Python language skills here in my 0 basic friends of the article, and not the 0 basic friends.

"Depends on, what do you think?" ”

Not also. It is important to learn some methods. For example, just to recommend the "internet Google", is a very good way to learn. The great thing about the internet is not just playing games, looking at the pictures of the eye-candy or all kinds of videos, of course, in a country for a long time the internet equals the entertainment network, I sincerely hope from reading this article friends start, the internet is not just entertainment network, or knowledge network and create network. Pull it away, get it back. In the course of learning, if you encounter a little doubt, do not let go, think about it, try it out, regardless of whether there is no result, but also Google a bit.

Listed as bullish, I wrote it very clearly, is Google, not let everyone go to use that what degree to search, the search is dedicated to search gossip, counterfeit drugs, as well as a variety of very frugal girls wearing pictures. If you really want to improve your technical horizons and focus on technical issues, please use Google. Of course, I know you are in use when the time is difficult, as a technical achievement in the person, must learn some Internet technology, you understand.

What the? You don't understand? You are indeed my reader: 0 basis. Then ask me specifically, whether it is to join the QQ Group or micro-blog, can be.
To practice the martial, brandished from the palace. The martial magic is a prerequisite.

To learn python, no self-palace. Python doesn't have to be that cruel premise, but it needs to be installed with something to use.

Everything you need to install is on this page: www.python.org/downloads/

Www.python.org is the official Python website, if your English is enough to use, then you can read it here and get a lot of gain.
In the Python download page, there are two main categories of Python, one is python3.x.x and the other is python2.7.x. It can be said that Python3 is the future, it is better than python2.7. But, now, there are many things that are not fully compatible with Python3. Furthermore, if you learn python2.7, for Python3, it is only a small change in some places.

So, here I am using python2.7 as an example to teach.

Installation of Linux Systems

What is the operating system of the computer used by crossing? Make yourself understood first. If it's a Linux distribution, it's like I'm a fellow. And I congratulate you, because you will install more Python libraries (modules) in the future, under this operating system, the operation is very simple, of course, if it is iOS, also, because it is the eggs under UNIX. It's just widows a little unorthodox.

However, it doesn't matter, Python is a cross-platform.

I take Ubutu 12.04 as an example, all the friends with this operating system (certainly very few), you will definitely enter Python in the shell, if you see >>>, and display the Python version information, congratulations, Because your system has its own python environment. Indeed, the Python environment is built into Ubuntu.

I have to install it myself again. So let's do it:

#下载源码, the latest version is 2.7.8, if later changed, you can change the version number in the following command # # source can also be downloaded on the website, specifically see the above download page wget http://www.python.org/ftp/python/2.7.8/ python-2.7.8.tgz# Decompression Source Package TAR-ZXVF python-2.7.8.tgz# compilation CD python-2.7.8./configure--prefix=/usr/local  #指定了目录make &&make Install

The above steps, I find from the Internet, for reference. Because my machine has already installed, do not want to toss. Once installed, enter the shell and enter Python and you will see the following:

Congratulations, the installation was successful. I use python2.7.6, maybe your version number is higher.

Installation of Windows systems

Go to the download page to find the Windows Installer, download it, such as download the file: Python-2.7.8.msi. Then there is the constant "next step" to complete the installation.

In particular, after installation, it is necessary to check if there is python in the environment variable.

If you do not yet know what the Windows environment variable is, and how to set it. Don't worry, Google, search: "Windows environment variables" can find how to set up.
This is done, in cmd, enter Python, get the results similar to the above, it means that it has been installed.

Installation of MAC OS x system

In fact, there is no need to write how to install, because with Mac OS X friends, is definitely the master of the High master, at least I have always admired those with Mac OS X and insisted that there is no replacement for Windows. Trouble with Mac OS X friends on the Internet to search it, with the front Unbutu almost.

If you follow the above method, successful installation can only be described as lucky, without it. If the installation is not successful, this is a great opportunity to improve themselves, because only when the problem to solve the problem, to know more profound truth, do not be afraid, there is Google, it can help listed as crossing solve all problems. Of course, join QQ group or through Weibo, ask me also can.

Once the ok! has been installed, it's ready to start programming. Finally shouted in a programming video course ads see the slogan, very inspired: "We programmers, do not seek to pass, but for error."

  • Related Article

    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.