Correctly install the requests library in order not to report an error [windows10/11 environment]

Problem Description

When using the pip command in the terminal or installing the request library in Pycharm, an error is often reported because you did not execute the command as an administrator.

Method 1: Use the pip command to install the request library in the terminal

2.1 First open the terminal as an administrator

Right-click the Start menu, click Windows Terminal (Administrator) , this step is very important.

2.2 Then update pip and install the requests library

(1) Update pip

python -m pip install --upgrade pip

(2) Install the requests library

pip install requests

Method 2: Install the request library in Pycharm

When starting the Pycharm software, open it as an administrator , and then install it in the package manager, there will be no error.

Guess you like

Origin blog.csdn.net/yuanchenglei/article/details/120742044