Solve the problem that Python pip fails to install requests and the bs4 library

As Jiang mentioned earlier, if there is a lack of third-party libraries when editing Python programs, you can use the PyCharm editor to install them directly. However, due to network problems, it is estimated that the library package file cannot be called. Then we can use the pip command tool to install.

1. Pip foundation installation

 pip install requests

Directly use pip to install the required libraries, such as requests. However, when installing directly, you may have network problems and cannot connect to the library source files.

2. Third party source installation

It may not be possible to connect directly from the official pip. Here we can use third-party sources, such as the common douban.

 pip install requests -i  https://pypi.douban.com/simple/

 Solve the problem that Python pip failed to install requests and the bs4 library - Page 1

Here you can install BS4

 Solve the problem that Python pip failed to install requests and the bs4 library - Page 2

It can still be installed.

Source: Lao Jiang Tribe » Solve the problem that Python pip fails to install requests and the bs4 library |Welcome to share (public account: Chiang's circle of friends)

Get new information from webmaster/add QQ group from the public account "Chiang Kai shek's circle of friends"【 one billion twelve million four hundred and twenty-three thousand two hundred and seventy-nine 】Get preferential promotion from merchants