Regarding the problem of reintroducing the third library every time pycharm creates a new project

First, you need to see how the third-party library is usually installed:

1. Install directly in pycharm every time you write a project:

In this case, the third-party library is not available globally. Therefore, after creating a new project, the new project cannot import the previous third-party library, and the interpreter needs to be selected again. For this situation, you can refer to the following blog , which is very detailed.

2. Install with the pip command:

In this case, third-party libraries are available globally. When creating a new project in pycharm, check the inherit global site-packages option, so that the project can inherit the global third-party library. Therefore, it is recommended to use the pip command every time you install a third-party library, so that you don't have to choose a parser every time you create a new project.

Guess you like

Origin blog.csdn.net/muyuyi_1999/article/details/89671894