Error when installing the three-party library Make sure that you use the correct version of 'pip' installed for your Python interpreter loc

Local version: python3.8

Problem: Error reporting when installing third-party libraries

Step 1: Install the third-party library in the setting of pycharm and report an 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 'D:\software\python3 .8\python.exe'.

As shown below:
insert image description here

Step 2: Using the command pip install openpyxl in the Terminal of pycharm also reports an error: WARNING: You are using pip version 19.2.3, however version 22.2.2 is available. You should consider upgrading via the 'python -m pip install -- upgrade pip' command.

Then, I made countless attempts based on the information on the Internet. The following is my bumpy life:
because of the problem of the pip version, I said to upgrade the pip version first, so I tried crazily. After countless failures, the upgrade was successful unexpectedly.
insert image description here

Attempt 1: According to the prompt on pycharm, directly execute python -m pip install --upgrade pip

The result failed, and the same error was reported, as follows:
insert image description here

Attempt 2: Enter easy_install -U pip on the cmd command line

Failed, no response directly
Reference document link: https://blog.csdn.net/qq_43856284/article/details/108270807

Attempt 3: timed out, failed

Enter python -m pip install --upgrade pip reference document link in the cmd command line
: https://blog.csdn.net/m0_37899908/article/details/125345438
insert image description here
insert image description here

Attempt 4: Hmm, great, failed with timeout again

Enter python -m pip install -U --force-reinstall pip reference document link in the cmd command line
: https://blog.csdn.net/hhhllll5/article/details/105577944
insert image description here
insert image description here

Attempt 5: Change the mirror, such as Tsinghua mirror to obtain the library

Link to the reference document: https://blog.csdn.net/qq_41575507/article/details/104555139
Well, it was others who successfully solved the problem, and I failed again.

Attempt 6: Double-click the installed 19.2.3 version of pip in the setting, and see the latest 22.2.2 version in the pop-up window, install

Result: It was a direct success. At this time, I can't speak in my heart. Going around in a big circle, it was solved so easily? Doubt what you are doing in front of you.
insert image description here

insert image description here
Summary: As long as you don't give up, the problem will definitely be solved in the end. Try the solutions on the Internet more, just in case it succeeds. There is also the simplest one, we have to try it. We often ignore the path in front of us and choose to take a detour.

Did you think it was over? Well, that's what I thought too, I finally successfully upgraded pip. However, when I went back to the setting to reinstall the three-party library, I still reported an error and returned to the origin of the problem. . .
insert image description here

Then, with the mentality of being a dead horse as a living horse doctor, I entered cmd and executed the installation command: pip install selenium
was successful. . .
insert image description here

This is a trance afternoon, I don't know if I am a rookie, will I install it in cmd in the future?
I need to take it easy and study it later. . . .
insert image description here

Guess you like

Origin blog.csdn.net/weixin_48415452/article/details/126411096