Python Learning (i) installation, environment configuration, and IDE recommendations

Source: Internet
Author: User

Python installation, environment configuration, and IDE recommendations

Official website: https://www.python.org/

Version: 2.x and 3.x differ greatly; Python3 is not backward compatible, it is recommended not to learn 2.x version of the direct Learning 3.x version, version of the difference can be referred to the website introduction

Install under Windows

Python can be installed in a multi-system operation, the installation and environment configuration of Python under WINDOWS, (Diagram reference: Baidu Experience) installation steps are as follows:

      1. Download installation program: https://www.python.org/downloads/
      2. After downloading, double-click Open, select the user, the default install for all users; Click Next (Next)
      3. Select installation path installation, can modify the installation path, the default C disk, such as C:\PYTHON34; Click Next (Next)
      4. Select the custom content, * recommended to check the ADD Python.exe to Path; Click Next (Next)
      5. Wait for the installation and click Finish
      6. Double-click the Python program, enter Python under CMD, and display similar to the following to indicate successful installation

        

    System Environment Variables : If step 4 is checked, environment variables are usually configured successfully;

If you still have problems, check my Computer-Properties-advanced-environment variables, whether the value of path contains the current Python installation directory path;

If none, append the path such as "; C:\python34" (Note that a semicolon is required ";" Paste into the value of path, and CMD again to enter Python to verify that the installation was successful

IDE recommendations

1. Vim

Vim can be said to be the best IDE in Python. Vim is an advanced text editor designed to provide the actual Unix editor ' Vi ' functionality, supporting a more complete set of features. Vim doesn't take much time to learn, and once you need a seamless programming experience, you'll integrate Vim into your workflow.



2. Eclipse with PyDev

Eclipse is a very popular IDE and has a long history. Eclipse with Pydev allows developers to create useful and interactive Web applications. PyDev is the IDE for the Eclipse development Python, supporting the development of Python,jython and IronPython.

    

notepad++ running Debug python

notepad++ is an open source text editor that is powerful and easy to use and supports code viewing (Python support), but cannot be run initially.

The following method is used to run the Python script using notepad++, F5 or click Run-run to eject the window

Copy and paste the following statements into the input box:
    cmd/k python "$ (full_current_path)" &pause & EXIT

Shortcut keys can be set after saving (see below for explanation of the principle)

    

    Debug and run: new Python file (. py) such as test.py, input statements such as print ("Hello World") are saved and run after running

    

notepad++ Program Operating principle explained:

The meaning of cmd/k is to execute the following command, and to keep the window after execution is complete. (that is, cmd means to open the Command Prompt window and run the commands behind/k-python)

cmd/k python = = start –> run –> input cmd–> input python

$ (full_current_path) means the full path of the current file, which is the notepad++ macro definition

& is to connect more than one command

Pause indicates the end of the run and waits for an arbitrary key

Exit means close the command-line window (you can omit EXIT if you use cmd/c). )

Python Learning (i) installation, environment configuration, and IDE recommendations

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.