When I used Pycharm to encode python code today, I found that the package installed through pip could not be called.
Figure 1 Failed to call the selenium package
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.
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~
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.
Figure 5 The packages needed to install the project
Pycharm cannot call packages installed via pip
Guess you like
Origin blog.csdn.net/m0_59838087/article/details/121442768
Ranking