PyCharm installation tutorial, graphic tutorial (super detailed)

"Introduction to the author": CSDN top100, Alibaba Cloud blog expert, Huawei cloud share expert, high-quality creators in the field of network
security

1. Download and install PyCharm

1) Visit the official website https://www.jetbrains.com/pycharm/download/#section=windowsto download the "Community Edition" installation package.

insert image description here

2) After the download is complete, "double-click" to run the installation package to start the installation.

insert image description here

3) Setting interface, click Next

insert image description here

4) After selecting the installation location, click Next

insert image description here

5) In the installation setting interface, after checking all 4, click Next

insert image description here

6) Select the menu folder interface, keep the default, click Install

insert image description here

7) Choose to restart manually later, click Finish

insert image description here

8) An icon appears on the desktop, and the PyCharm installation is complete.

insert image description here

If your computer "does not have a Python environment" , you also need to download a Python.

2. Download and install Python

1) Visit the official website https://www.python.org/, select Downloads , select Windows , click Python 3.11.3 , and download Python

insert image description here

2) After the download is complete, double-click to install

insert image description here

3) Check Add python.exe to PATH , the environment variables will be automatically configured, click Install Now

insert image description here

4) Wait for the progress bar to finish, the installation is successful, click Close

insert image description here

5) Enter python in any path of cmd, and the following interface will be displayed, indicating that "environment variable configuration is complete" .

insert image description here

3. Create a project

1) Double-click the icon, agree to the unequal treaty, and click Continue

insert image description here

2) Data sharing interface, click Don't Send

insert image description here

3) Click New Project to create a new project

insert image description here

4) Select the project path, select the Python environment (that is, the Python we installed in Chapter 2), and click Create

insert image description here

5) A test project is provided by default, right-click Run 'main' and run

insert image description here

6) Output the following, indicating normal.

insert image description here

4. Install the module

When using PyCharm in the early stage, you often encounter the error of No module named “xxx” . This is because Python does not have the module you use by default and needs to be imported manually.

1. pip installation

In any path of cmd, execute pip install xxx, and replace xxx with the full module name.

pip listView installed modules

insert image description here

By default, pip downloads modules from foreign servers. If you encounter WARNING: Retrying (Retry(total=1,
it may be because you use a "network proxy" . If you are too lazy to turn off the network proxy ,
you can specify the image of Alibaba Cloud and add trust site, the command is as follows:

pip3 install xxx -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com

2. PyCharm installation

1) Upper left corner - [File] - [Setting...]

insert image description here

2) [Project: pythonProject] - [Python Interpreter] - You can see the installed modules on the right, click the plus sign in the upper left corner

insert image description here

3) In the opened window, search for the module and click [Install Package] to download it.

insert image description here

Guess you like

Origin blog.csdn.net/wangyuxiang946/article/details/130634049