Zero basic learning Python (1) Python environment installation, basic learning python Environment

Source: Internet
Author: User

Zero basic learning Python (1) Python environment installation, basic learning python Environment

Any advanced language requires a programming environment of its own. This is like writing. It requires paper and pen, writing on a computer, and text processing software, for example, OFFICE with different names. Pen, paper, and office software are the hardware or software used to write things. In short, the words can only be written on the top to become an article. So programming also requires something like a program. You need to write the program to it to form things like the article at last.

Now I have another term, "program". What is a program? This article will not be discussed. If the word is not very understandable to the audience, google it online.

Note: A very important learning method is recommended.

I am going to read the article's zero-based friends, or even non-zero-based friends. I don't want to learn many advanced python language skills here.

"Come on, do you think you're crazy ?"

None. It is important to learn some methods. For example, google surfing is a good learning method. The greatness of the Internet lies not only in playing games, watching eye-catching photos or various videos. Of course, for a long time in a country, the Internet is equal to the entertainment network. I sincerely hope to start from my friends who read this article, the Internet is not just entertainment network, but also knowledge network and creative network. Pull it back. In the course of learning, if you encounter a little question, you should not let it go. After you think about it and try it, you should google it whether there are any results or not.

After reading the column, I wrote it clearly. It was google, not to let everyone use that degree to search, the search is dedicated to searching for gossip, fake medicines, and various pictures of frugal girls. If you really want to improve your technical vision and focus on technical issues, use google. Of course, I know that it is difficult for you to use it. As a technical person, you must learn the Internet technology.

What? Don't you understand? You are indeed my reader: zero base. Let me know, whether it's joining the QQ group or Weibo.
If you want to practice the power of your work, you can use your own tools. The power of God is a prerequisite.

To learn python, you do not need to learn it yourself. Python does not need to be so cruel, but it also requires installation of something for use.

All the things to be installed are on this page: www.python.org/downloads/

Www.python.org is the official website of python. If you use enough English, you can read it here and get a lot of results.
On the python download page, there are two types of python: python3.x. x and python2.7.x. It can be said that python3 is the future, and it is better than python2.7. However, there are still many other things that are not fully compatible with python3. What's more, if you have learned python2.7, for python3, it is only a small change in some places.

So here I will use python2.7 as an example to teach.

Linux Installation

What operating system does the official computer use? Understand it first. If it is a Linux release, it will be the same as me. And I congratulate you, because more python libraries (modules) will be installed in the future. In this kind of operating system, the operation is very simple. Of course, if it is iOS, it will also be the same, because they are all UNIX eggs. However, widows is a little different.

But it doesn't matter. python is cross-platform.

Taking ubutu 12.04 as an example, all the friends who use this operating system (certainly few) will enter python in shell. If you see >>>, the python version information is displayed. Congratulations, because your system already has a python environment. Indeed, ubuntu has a built-in python environment.

I have to install it myself. Then, perform the following operations:

# Download the source code. The latest version is 2.7.8. If you change it later, you can change the version number in the following command # The source code can also be downloaded from the website, for details, see the preceding download page wget http://www.python.org/ftp/python/2.7.8/python-2.7.8.tgz?decompress source code package tar-zxvf Python-2.7.8.tgz # compile cd Python-2.7.8. /configure -- prefix =/usr/local # specifies the directory make & make install

The above steps are obtained from the Internet for your reference. Because my machine has been installed for a long time and I don't want to worry about it. After installation, go to shell and enter python. The following figure is displayed:

qw@qw-Latitude-E4300:~$ pythonPython 2.7.6 (default, Nov 13 2013, 19:24:16) [GCC 4.6.3] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> 

Congratulations! The installation is successful. I use python2.7.6. Maybe your version is higher.

Windows Installation

Find the windows Installation Package on the download page, download it, for example, download this file: python-2.7.8.msi. Next, we will continue to "Next" to complete the installation.

Note: After installation, check whether python exists in the environment variables.

If you do not know what windows environment variables are and how to set them. Don't worry, please google it and search: "windows environment variable" to find out how to set it.
After the preceding steps are completed, input python in cmd to get the result similar to the preceding one. It means that the installation is complete.

Installation of Mac OS X

In fact, there is no need to write about how to install it, because a friend of Mac OS X must be a master of the master, at least I have always admired those who use Mac OS X and insist on not switching to windows. You may need to search for Mac OS X on the Internet, which is similar to the previous unbutu.

If the installation is successful successfully using the above method, it can only be noted that it is lucky. If the installation is not successful, this is an excellent opportunity to improve your own, because only when you encounter problems can you solve the problem, in order to know more profound truth, do not be afraid, there are google, it can help column administrators solve all problems. Of course, you can join the QQ group or ask me via Weibo.

OK! After installation, you can start programming immediately. Finally, I shouted a slogan I saw in a programming video course advertisement. It was very enlightening: "We programmers don't want to pass it, but they want to report an error ".


Is it appropriate to study python without basic knowledge?

Of course you can. In fact, it's similar to reading tutorials online.
If programming really has no foundation, you can certainly start with python, but quick development doesn't matter how fast it feels or how much accumulation you have.

How can I learn Python based on zero programming?

Zero infrastructure is obviously impossible. At least you can type. You can also use English. You should have a degree. Mathematics should at least have a foundation. Logical thinking is also good. There is also a concept for programs.

Therefore, you should have a foundation. A beginner's language should start from the basics. It is best to find the shortest tutorial. But you must be able to understand it.

Understanding this is the most important requirement. There are not many good tutorials. Most of the tutorials are for people with basic knowledge.

You can try to find some tutorials for high school students and children. I used to study C language and read high school student tutorials. I felt quite useful.

It is best to have a basic person, an old professor, and a very thin tutorial for beginners.

If not, follow these steps.

First, learn the expression. Learning variable types and variables. Learned and then learned the statements. The statement is ready for use. Then learn the function. If you have learned more, you can learn the data structure. In this way, you may learn python in 1-2 months.

Even if you are 50 years old, you can learn the python language. However, the highest possible level may be limited.

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.