pycharm installs third-party libraries: Try to run this command from the system terminal. Problem solved

PyCharm installs third-party dependent library error: Try to run this command from the system terminal. Problem solving
PyCharm installs third-party library error: Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at 'C:\Users\krislong\AppData\Local\Programs\Python\Python38\python.exe'.
Error has been resolved :
insert image description here
Possible reasons: 1. Version incompatibility 2. Name when installing the library Error 3. Installing a non-third-party library
1. You can check the installed version of pip in the following two ways
insert image description here
or
insert image description here
learn from some webpage information that it may be related to the pip version when you installed python.
Solution: Enter python
in the Terminal console of Pycharm
-m pip install pip==20.2.1
insert image description here
Then you can search for the dependent library name in the IDE to install, and the installation is successful! !
In addition, you can also directly use the pip install package name command to install the library you need to install.
It is recommended that you do not use the quick installation in the IDE when installing the third-party library, and install it manually with the pip command without error.

2. The name of the installation library is wrong.
When installing a dependent library, you need to check the full name first, and it must not be an abbreviation. For example, the PIL library for image processing, when it is installed, it is not installed with pip install PIL, but installed with pip install pillow. PIL is just the abbreviation of pillow, but many people directly write it as PIL installation, which leads to errors. Installing with the correct name solved it.

3. Install non-third-party libraries
Not all libraries are third-party libraries. The current pycharm software has built-in commonly used dependent libraries, such as time, os and other libraries. These built-in libraries do not need to be downloaded and installed separately. Repeatedly install the Python built-in library, so of course the installation will fail.
If you also encounter this problem, try to check online whether the library you installed is a built-in library. The built-in library already exists without our installation and can be used directly.

Guess you like

Origin blog.csdn.net/krislong/article/details/128816600
Recommended