Why learn to install Python and Python environments

Source: Internet
Author: User

Most of the people in the work may be in C + +, Java and other language-based, this may be our first contact with the development language, such language generally has a rich library of classes, efficient execution rate, flexible combination of control, need to be compiled in execution, for large project engineering; If you develop under Linux, Inevitably also need to learn shell,shell suitable for system level such as file, process and so on Operation control, and quickly write, immediately execute can see the effect, complete some system automation is also more appropriate, Shell is a high-level abstract system interface, located on the OS API, The completion of the task is more granular, if the need for finer levels of control is not appropriate, such as database, XML-related operation of the shell is very difficult. To become a good programmer, learning a third language is essential, after all, the technology is not pressure, more understanding of a language, there may be more than one way to solve the problem, whether there is a language at the same time have java/c/c++ and shell advantages? It can be said that Python is the perfect candidate, and Python's history is relatively long, 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 clearly felt Java, Shell's figure.since Python has so many benefits, let's start our Python journey!
The first is the installation of the Python open environment, the Python interpreter is available in both the Windows version and the Linux version, and the current mainstream version is 2.7 and 3.3. Windows installation is simple, download the installation package on the official website all the way nextRemember to choose Add Python.exe to PATH, after the installation is completed both the idle Python GUI and python command line, start any one can enter the interactive Python execution EnvironmentLinux under some distributions by default with Python, if there is no or version is not appropriate, can be installed with the installation tools provided by the system, you can also download the TAR package on the official website directly installed source code,TAR-XVF python-xxx.tar.xz && cd python-xxx &&./configure && make && make install, Ann Enter Python on the command line after successful loading to enter the interactive environment. Python-v/--version can view the installation version of PythonPython-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 a module's detailed help >>>import OS import a Module>>>os import module and view the module installation path

Inevitably in the development process to refer to third-party module, third-party package interdependence makes installation cumbersome, so the third-party package installation is mainly in the following ways:

1. Download the tar file and extract it into the directory 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, and sometimes need to install some libraries manually
3. Pip Uninstall Mysql-python
when multiple versions of Python are present in the system, if the third-party LIB installation directory is not the default Python version, you can specify easy_install to be the full path under the specified Python version

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.