python based tutorial: PyCharm first installation and tutorial

In this paper, in the form of illustrations to introduce PyCharm first installation and use tutorial, step by step through the actual operation and demonstration case for everyone, we introduce to you in great detail, has a certain value for references, a friend in need can refer
pycharm Profile

PyCharm is a Python IDE, it can help users with a set of productivity tools to improve their use Python language development, such as debugging, syntax highlighting, Project management, code branches, IntelliSense, auto-complete, unit testing, version control . In addition, the IDE provides some advanced features, support for professional Web development under the Django framework.

1 PyCharm Download

Download and install PyCharm very simple, can be directly Jetbrains company official website to download, the following steps:

(1) Open Pycharm official website http://www.jetbrains.com, PyCharm selected item under the Tools menu, as shown in Figure 1, to download PyCharm interface.
Here Insert Picture Description
1 PyCharm official page surface of FIG.

(2) In PyCharm download page, click the "DOWNLOAD NOW" button, as shown in Figure 2, into PyCharm Environment and the version selection interface.
Here Insert Picture Description
Figure 2 Pycharm download page

(3) choose to download Pycharm development environment for Windows, click the Start Download Community Edition PyCharm (Communit), shown in Figure 3.
Here Insert Picture Description
Figure 3 Pycharm environment and select the page version Download

(4) In the pop-up dialog box, set the download downloading file storage path for the download file easy to find, try to set up file storage path is familiar path or root, such as downloading paper path set for the "D: \". As shown in Figure 4. Here Insert Picture Description
Figure 4 Pycharm download path settings page

(5) Click the "Download" button to start the download. After the download is complete, you can see the D drive installation file has been downloaded Pycharm. As shown in FIG.
Here Insert Picture Description
FIG 5 the installation package download is complete Pycharm

2 Installing the software

To install PyCharm follows:

(1) Double-click the installation package PyCharm installation, software installation path into the setup interface on the Welcome screen, click "Next" button.

(2) in the installation path. Set reasonable installation path. It is strongly recommended not to install the software to the path where the operating system, or the operating system crashes and other special circumstances appear to be redone when the operating system, programs under PyCharm program path will be destroyed. PyCharm default installation path for the path where the operating system, the proposed changes, in addition to the installation path does not recommend using Chinese characters. I select the installation path as "D: \ PyCharm", as shown in FIG. Click the "Next" button, enter the Create Shortcut interface. Here Insert Picture Description
FIG 6 is provided Pycharm installation path

(3) set up a shortcut to the program in PyCharm create a desktop shortcut interface (Create Desktop Shortcut) in. If the computer is a 32-bit operating system, select the "32-bit launcher", or select the "64-bit launcher". Here is a 64-bit computer system, operating system, so select "64-bit launcher"; then set the association file (Create Associations), .py check box to the left, so that later opened .py (.py file is a python script file, the next time we write a lot of procedures are .py) file, the default call PyCharm open, as shown in FIG. Here Insert Picture Description
FIG 7 is provided and associated shortcuts

(4) Click the Next button, select Start Menu folder into the interface, as shown in the interface without setting 8, using the default, click the Install button (install about 10 minutes, be patient and wait). Here Insert Picture Description
8 Select the Start Menu folder interface

(5) After installation is complete, Click Finish to complete the installation, as shown in FIG. You can also select the previous "Run PyCharm Community Edition" radio button, click the Finish button, so you can run directly PyCharm development environment. Here Insert Picture Description
9 to complete the installation of FIG.

After (6) PyCharm the installation is complete, we will create a folder in the Start menu, shown in Figure 10, click "JetBrains PyCharm Community Edition 2018.1", start PyCharm program. Of course, open PyCharm quick way is to click on the desktop shortcut "JetBrains PyCharm Community Edition 2018.1 x64" , the icon shown in Figure 11.
Here Insert Picture Description
Figure 10 Pycharm menu Figure 11 Pycharm desktop shortcut

3 runs PyCharm

To run PyCharm development environment is as follows:

(1) Click Pycharm desktop shortcut, start PyCharm program. Choose whether to import the development environment configuration file, here choose not to import, click the OK button, read the agreement into the page shown in Figure 12.
Here Insert Picture Description
12 environment configuration file Form

Scroll bar (2) drag the protocol text box to the text box bottom, indicate read the agreement has been completed, then the Accept button displayed by greyed as available, as shown in Fig. Click the Accept button, enter the user interface UI plug-in extensions installed (when this step is executed, depending on the machine, there may be a data sharing page, simply click on "Do not send" button). Here Insert Picture Description
FIG 13 receives the agreement Pycharm

(3) Select "Skip Remaining and Set Defaults", skip the remaining set, using the default settings of the system development environment configuration, shown in Figure 14, then the routine proceeds to the welcome screen. Here Insert Picture Description
FIG 14 user interface UI plug mounting extension

4 Create a project directory

In order to facilitate storage of PyCharm project file, to set about the location of the project directory in Pycharm welcome screen. Methods as below:

(1) into the PyCharm welcome page, click on "Create New Project", create a new project file, shown in Figure 15. Here Insert Picture Description
Figure 15 Pycharm welcome screen

(2) PyCharm will automatically set a new path for the project file is stored. In order to better manage the storage path of the project, it is best to set up a manageable, you can enter the storage path of the project file is placed directly in the storage path input box, you can also store the path to the right by clicking the Select button to open the path selection dialog selection (storage path can not be stored python path has been set), shown in Figure 16. Here Insert Picture Description
Python storage path 16 is provided in FIG.

(3) If the installation path selection dialog provided by the path may be selected as already existing folder storage path, shown in Figure 17. You can also click "new fold" button to create a new folder to store the project file, shown in Figure 18. Do not set the storage path to the disk where the operating system, storage and storage paths as much as possible to the path easy to find. After the setup is complete storage path, click the Create button to create a project file. Here Insert Picture Description
FIG 17 store path selection dialog provided by the path Here Insert Picture Description
18 to create a new folder as a storage path

(4) create a project is completed, the project will enter the list shown in Figure 19. Here Insert Picture Description
19 create a new folder as the storage path

It will display a daily, each time providing tips to apply when a Pycharm function (5) for the first time the program starts. To close a day function may be a check box displays the daily check out, click the Close button to close one day, as shown in Fig. If you close a day, late again want to display a day, you can click select Help → tip in PyCharm development environment menu of the day menu items, starting day one. Here Insert Picture Description
FIG 20 Pycharm a day

5 write "hello world" program

The previous steps have been initiated PyCharm development environment, then use this environment to write hello world program, follow these steps:

(1) Right-click the newly built dream project, the pop-up menu, select New-> PythonFile menu item (be sure to select PythonFile item, this is essential, otherwise unable to follow-up study), shown in Figure 21. Here Insert Picture Description
21 Pycharm view of the official website

(2) In the New File dialog box to create the input file name python "hello world", 22 and 23. Click the "OK" button to complete the new python paperwork. Here Insert Picture Description
New File FIG. 22 is not inputted before the input-completed file dialog box in FIG. 23 New

(3) Enter the code "print (" hello world! " )" In the completion of the newly created file code editing area. After the completion of the input code is found to be below the yellow lamp 24, it is recommended that the editor of the input code provided, it does not matter. Select Run-> Run ... menu, run the program, shown in Figure 25. Here Insert Picture Description
24 Enter "hello world Code Here Insert Picture Description
25 Run Menu

Description: Click Run the main menu, you can see the pop-up menu in the first two menu "Run" (run) and "Debug" (debug) is grayed out, can not trigger the state, as shown in Figure 26. Run on the toolbar, and debugging tool button is not available, shown in Figure 26. This is because the first time you run the program, you need to configure the program to run. Here Insert Picture Description
Run button on the toolbar Figure 26 is unavailable

(Four) in the pop-up menu, select "hello world", run the program, shown in Figure 27. Here Insert Picture Description
Figure 27 is set to be run

(5) If the program code is not an error, displays the results. Figure 28. Here Insert Picture Description
Results FIG 28 running

Description: When programming, sometimes with the following code pops up a small yellow light bulb, which is used to do?

In fact, there is no program errors, suggestions, or just to remind some improvements to the code Pycharm proposed. Such as adding annotations created using other sources. A yellow light bulb does not affect the operating results of the code,
and finally to recommend a very wide python learning resource gathering, [click to enter] , here are my collection before learning experience, study notes, there is a chance of business experience, and calmed down to zero on the basis of the actual project data, we can at the bottom, leave a message, do not know to put forward, we will study together progress
summary

The above is PyCharm small series to introduce the first installation and use tutorial, we want to help

Published 27 original articles · won praise 14 · views 20000 +

Guess you like

Origin blog.csdn.net/haoxun08/article/details/104762088