Install and configure PyCharm

PyCharm

PyCharm is an integrated development tool developed by the Nordic JetBrains company.

1. Download and install

1.1 Download

The following is the detailed process of download and installation:
Open the official website , the following interface appears:

website

Insert picture description here
Insert picture description here
Scroll down: find PyCharm:

Insert picture description hereSave:
Insert picture description here
I saved it here:
Insert picture description here

1.2 Installation

Next, double-click to open the exe file, click "Yes" in the pop-up dialog box, and then the following figure appears:
Insert picture description here
click next
Insert picture description here

Check the options inside, except for the last one, check everything else.
Insert picture description here
In the pop-up window, click install:
Insert picture description hereThen there is a crazy installation:
Insert picture description here
after the installation, you will be prompted to restart the computer, you can choose to restart it for a while, and then restart after you save all the important files. Since I am writing this blog, I need to save the blog before restarting.
Insert picture description here

1.3 Trial run

Now that the installation is complete, you can double-click the icon on the desktop to open Pycharm:
Insert picture description herechoose to create a new project
Insert picture description here
in the interface that appears, select the local environment in the interface that appears, and add the locally installed interpreter, which is Python.exe
Insert picture description here

Insert picture description here
Insert picture description here
Find the local interpreter:
Insert picture description here
click ok to end.
Insert picture description here
Go back to the original interface, check the option to create a sample, every time you create a new project, a sample file will be automatically generated, and you can write your own content by deleting the contents:
Insert picture description here

After clicking Creat, you need to wait for a few seconds, and then the following interface appears:
Insert picture description here
Just click close.
Insert picture description here
As above, you can write your own code after deleting the contents and then run it. The result came, and it proved that it was installed.
Insert picture description here
You can click File>Save As to save the file every time you finish writing the code. Next time you can use the open option to open the saved file.
Insert picture description here
Well, that's it for the download and installation of PyCharm.

2 Simple configuration of PyCharm

Let's open PyCharm first, right-click the work folder>New>Director in the left menu bar, create a new folder, name it "basic", use the same operation, and create a new folder named "Day02" in the basic folder.
Insert picture description here

Let's create a new Python file in Day02 and name it "PyCharm Configuration".

2.1 Modification of the theme

Click: File>Settings>
Insert picture description hereSelect Apearance&Behavior in the pop-up window, and find the Theme option on the right, where you can modify the theme.
Insert picture description here

Click "Apply" after editing.

2.2 Modify font

Select Editor>font in the left menu bar to modify the font.
Insert picture description here
You can modify the font, size, line spacing, etc. in this interface.
Insert picture description here
Generally, a font size of 22 is sufficient. Click OK to confirm.

2.3 Turn off the software update function

During the programming process, a reminder to update the software will often pop up, which will affect the network speed and programming. You can turn off this function.
Still in File>Settings>Apearance&Behaviors>, select System Settings>updates, and remove the check mark in front of automatic update, as shown in the figure.
Insert picture description here
Click OK to save.

2.4 Set shortcut keys

Click keymap in the above interface, as shown in the figure: After
Insert picture description here
setting, select OKInsert picture description here

2.5 Automatic package guide settings

When we are writing code, the automatic package guide function will provide a lot of convenience and can save us time. For example, if we enter im, import will be displayed later. It can be set here:
Insert picture description here
check it and confirm.

2.6 Automatically open the last project setting

Sometimes the project we edited last time needs to be improved this time, and the last project can appear when the software is opened. Or turn off the function when it is not needed. Set here:
Insert picture description here
set to click OK to confirm.

2.7 Several ways to run the project

The first type: After writing the code, right-click in the blank space, as shown in the figure below, and select run "file name".
Insert picture description here
The second: This method must pay attention to first choose the project you want to run. Because what you see is not necessarily the same as the file item you want to run.
Insert picture description here

The third type: shortcut key "Ctrl+shift+F10". (This method I opened the calculator, dizzy)

2.8 Add header file

Insert picture description here
Insert picture description here
Insert picture description here
Click OK to confirm. Create a new project and the title header appears.
Insert picture description here
The content of the header header is written as follows and can be copied.

# @Time : ${DATE} ${TIME}
# @Author : Jerry
# @File : ${NAME}.py
# @Software: ${PRODUCT_NAME}

2.8 Encoding settings

Insert picture description here
After setting, click OK to confirm.

Guess you like

Origin blog.csdn.net/m0_46738467/article/details/109330274