Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem of could not be resolved when python introduces requests to report error

Shulou Source: shulou.com Published: 2022-05-31 16:32:45 09月21日 Update

This article is a detailed introduction to "python introduction requests error could not be resolved how to solve", the content is detailed, the steps are clear, the details are properly handled, I hope this article "python introduction requests error could not be resolved how to solve" article can help you solve doubts, the following follow the small series of ideas slowly in-depth, together to learn new knowledge bar.

Before python crawler gets web resources, networking is a must. When used as the most commonly used reauests package in python, you may encounter the following problems:

Troubleshooting steps:

(1) pip list Check whether the requests package is installed

pip list

You can display currently installed third-party modules and pip version numbers.

The above indicates that the requests package has been installed. If it is not installed, skip to step 2. If it is installed, skip to step 3.

(2) Install the request package

pip install requests

Then you can verify it again via pip list.

(3) In the.vscode directory of the current project, modify the settings.json file.

"python.analysis.extraPaths": [ "./ py_src"]

Will.../ py_src replaced by the installation path.

The path can be found on the cmd command line using the where python directive, and in lib>site-packages, find requests.

Read here, this article "python introduction requests error could not be resolved how to solve" article has been introduced, want to master the knowledge points of this article also need to practice to understand, if you want to know more related content articles, welcome to pay attention to the industry information channel.

Tags: Steps articles content paths questions proper again the preceding item can be adopted commands such as above commonly used ideas instructions files new knowledge more modules crawlers versions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Shulou Tech Info NVidia MariaDB Docker