Pycharm cannot call packages installed via pip

When I used Pycharm to encode python code today, I found that the package installed through pip could not be called.
Failed to call selenium package
Figure 1 Failed to call the selenium package
selenium already exists
Figure 2 Selenium already exists
After a period of research, it is found that Pycharm will create a new Python interpreter in the project and call this interpreter.
Python interpreter in Pycharm project
Figure 3 The Python interpreter in the Pycharm project
Since the interpreter in this project does not share a site-package with the system's default Python interpreter, it cannot call the package installed through the command line pip.
Changing the interpreter used by the project to the default Python interpreter of the system can solve the problem~
The system default Python interpreter
Figure 4 The default Python interpreter of the system
Or you can click the plus sign in the picture to install the required packages for the project separately.
Packages needed to install the project
Figure 5 The packages needed to install the project

Guess you like

Origin blog.csdn.net/m0_59838087/article/details/121442768