Why learn to install Python and Python environments

Source: Internet
Author: User

Most people at work may be based in C + +, Java and other languages. This may also be the first development language we have come into contact with, which typically has a rich library of classes, an efficient run rate, and a flexible combination of controls that need to be compiled and run. for large project projects; If you develop under Linux, you will inevitably need to learn the shell. Shell suitable for the system level such as file, process and other operations control, and high-speed writing, immediately run can see the effect, complete some systems on their own initiative is also more appropriate, the shell is a high-level abstract system interface, located on the OS API, complete the task granularity is greater, It is not appropriate to assume that finer levels of control are required. For example, database, XML-related operations shell is more difficult, and compared with the shell contains $, *, @ and other special symbols. Python is much more readable. To be a good program ape. Learning a third language is indispensable, after all, the technology is not pressure body, more understanding of a language. There may be more than one way to solve this problem, if there is a language at the same time have the advantages of java/c/c++ and shell? Python is the perfect candidate, and Python's history is relatively long, and there are many successful cases in the industry, such as Python in Google, Dropbox is one of the mainstream programming language, in the use of the process can also be very clearly felt Java, Shell's figure.

Since Python has so many advantages, let's start our Python journey.


The first is the installation of the Python open environment, the Python interpreter has both the Windows version number and the Linux version number, the current mainstream use of the version number is 2.7 and 3.3. Windows installation is very easy, download the installation package on the official website next timeRemember to choose Add Python.exe to PATH, after the installation of both the idle Python GUI and python command line, start no matter what one can enter the interactive Python runtime environmentsome Linux distributions have Python on the default, assuming no or version number is inappropriate. Can be installed with the installation tools provided by the system, also can download the TAR package source code directly installed on the official website,TAR-XVF python-xxx.tar.xz && cd python-xxx &&./configure && make && make install, After installation, enter Python on the command line to enter the interactive environment. Python-v/--version ability to view Python's installation version numberPython-h can view the help information of the Python interpreter after entering the Python interactive environment, you can enter the Python command statement like a shell: >>>help () into the help page help>keywords View all Keywords Help>modules view all modulehelp>quit exit >>>help (' str ') to view Help for a topic (' int ') >>>help (' sys ') view specific Help for a module >>>import OS import a Module>>>os import module to view module installation path

The third-party module is inevitably referenced in the development process. The interdependence of third-party package makes installation cumbersome, so the third-party package installation is mainly in the following ways:

1. Download the tar file and unpack it into the folder Python setup.py build && python setup.py install
2, Easy-install Mysql-python or Pip Mysql-python can solve the problem of third-party pacakage relying on other libraries, sometimes need to install some libraries manually
3. Pip Uninstall Mysql-python
when there is a multi-version python in the system, assuming that the third-party Lib installation folder is not the default Python version number, you can specify easy_install to the full path under the specified Python version number

Well, when the Python environment is done, get into Python's learning!

Why learn to install Python and Python environments

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.