Installing Python runtime environment

In the python's official website can be downloaded directly to the appropriate operating system platform python installation package: https: //www.python.org/downloads

 

 Click to download after installation interface, select the interface below the recommended Add Python 3.x to PATH check box so that the installation program will automatically be added to the Python path PATH environment variable.

2, configure the environment variables

      Steps on the Windows platform configuration PATH environment variable as follows:    

     (1) Right-click "Computer", the shortcut menu, select "Properties" menu item is displayed as shown below window, click Advanced System Settings, select Environment Variables

 

 

 

There are two lists in the environment dialog box, above the list box is currently logged on to Windows environment variables set by the user, is only valid for the current logged in user environment variables in this set. The following is a list box to set the environment variable for all users, which means that these variables are valid for all users, where you can set the PATH environment variable. Add variable value (V) of the text box, Python installation directory, a plurality of paths between semicolons (;) separated

 

Open the Windows command-line tool, execute the command python --version, if the output is shown below illustrates python has been installed successfully.

3, installation of Anaconda Python development environment

  Develop a complete application python, python module itself provides only far enough, it is necessary to use a large number of third-party modules. These things install third-party modules when publishing Python applications is a daunting but it is a lot easier with Anaconda. It is an integrated operating environment python. Its installation is very simple, first into her download page, https: //www.anaconda.com/download

4, the installation JDK

     JDK default installation path Program Files, need to add double quotes for spaces quote too much trouble, you can click to change the installation path D: \ java \ jdk8 start the installation jdk, during installation dialog box will pop up called for jre (Java runtime. environment, java runtime environment) installation path. JRE is a subset of the JDK. The JRE includes the Java environment to run only, does not include the Java source code compilation environment, JRE Java program is generally used to publish, to publish general JRE Java program (JER because of the smaller volume).

    The C: \ java \ JDK8 \ bin path is added to PATH environment variable, so you can use javac.exe command to compile a Java program in any directory. As shown JDK installed successfully.

 

5, download and install eclipse

    Develop python program can use PyDev plug-in, but in order to use this plugin, you need to install Eclipse. Eclipse is recommended to use offline installation

 (1) the download page http://www.eclipse.org/downloads/eclipse-packages

 

 

 

(2) can be selected Eclipse IDE for java Develpoers, this version is very clean, you can only develop SE application, you can choose another image is downloaded, such as Dalian Neusoft Institute of Information

6、Python IDE(PyDev)

    PyDev can be used to install online

  (1) into the Eclipse select Help -> Install New Software menu item, click on the pop-up dialog box will pop Add Repository dialog box, enter PyDev in the Name text box, in the Location text box, type http: // pydev. org / updates, and then click ok to close the dialog. Then downloads the information to be updated plug-ins from http://pydev.org/updates, to keep the network open. Then choose a list of all entries in the list, click Next to complete the installation, if you can point to continue NEXT been clicking, after the Review Licenses window appears, click the Finish button to start the installation PyDev. Click Install anyway during installation button to continue with the installation. Installation may take longer, after installation restart eclipse.

7 Configuring PyDev development environment

    PyDev Python does not include operating environment, so PyDev before use, the front mounting To PyDev Python runtime environment associated with PyDev.

(1) Select in Eclipse Windows -> Preferences menu option, and then in the pop-up list on the left, select PyDev -> Interpreters -> Python Interpreter node, then click on the right side of the Quick Auto-Config button, it will automatically detect Python runtime environment, post-test is successful, click Apply and Close to close the Preferences dialog.

8, test development environment PyDev

     First create a Python project in Eclipse, select File -> New -> PyDev Project menu item will pop up PyDev Project dialog box. Enter MyFirstPython in the Project name text box, select the Grammar version 3.6 in the list, and then select the following Create 'src' folder and add it to create a Python project after the PYTHONPATH Options Click the Finish button. After creating MyFirstPython project, there is a project in the src directory, select the directory and select New from the right-click on the shortcut menu -> File menu item in the dialog box under the File name text box, enter Test.py, then click the Finish button, the src directory is the establishment of a Test.py file.

9, installation PyCharm

   PyCharm IDE is dedicated to the development of a Python program can go to the official website to download the following PyCharm PyCharm installation file:

    http://www.jetbrains.com/pycharm

Fell after the download page scroll bar will find the Professional Edition and Community Edition. We can do with the community, click on the download to run after download, you can download PyCharm

10, the configuration PyCharm

     Click PyCharm Welcome screen Create New Project button will display the New Project window, which is used to create a Python project. Enter the Python project name in the Location text box, if you select a different Python runtime environment, you can click Project Interpreter, will appear Python runtime environment selection screen in New Project window. Finally, click the Create button to create Python project, generally Python source code files in the src directory. Then select the src directory and select New from the right-click on the shortcut menu -> Python File menu to create a Python file (here Test.py)

If you have not configured to PyCharm, you need to click the button to the right of the Interpreter list box, and then select Add Local menu item in the pop-up menu, then pop up the Add Local Python Interpreter window. Virtualenv Environment selection list on the left, right click button Interpreter ellipsis to the right list box, a pop-up window, the Select Interpreter Python, or other selected Anaconda Python interpreter in the window, and then click the OK button to close the window .

11, Python environment in the REPL

     There are three ways to run Python

          Run directly by Python command

         In the run Python IDE

        Run Python's REPL environment (a simple interactive programming environment, you can also call Python console), simply execute Python commands in windows command-line tool, you can enter REPL environment. At the command prompt (>>>) input print ( "hello world"), press the Enter key, it will output hello world in REPL environment. Press Ctrl + Z key to exit REPL environment

     

Guess you like

Origin www.cnblogs.com/lcy1995/p/11444082.html