The general steps for setting up a Python environment are as follows:

01 install Python

Visit the official Python website to download the installation package,…

Click to download Python 3.9.5

Double-click the downloaded Python installation file to install it with the default Settings

02 installation Pycharm

Visit the official PyCharm website to download the installation package,…

If you want to use it as a crawler, you can download the Community version.

Double-click the downloaded installation package and install it according to the default Settings.

03 set Pycharm

Open PyCharm, click Customize, and then click All Settings in the lower right corner.

In the pop-up window, click on Python Interpreter, and in Python Interpreter on the right select the previously installed Python version;

The selection will automatically bring up the relevant information

Click the button below [OK] to complete the configuration

04 run hello, crawler combat notes!

Open PyCharm and click the [New Project] button

To avoid running environment version conflicts, you can select the option to add a new running environment to both.

Add or modify [] to the following code as shown in the following image

Click the green run button to run the code

Run successfully!