If you encounter the "Import "requests" could not be resolved from source" problem, you can try reinstalling Python and the requests library.
First, you need to uninstall your current Python and requests libraries. On Windows systems, you can uninstall them by running the following command at a command prompt:
pip uninstall requestsYou can then download the Python installer to install the latest version of Python. You can download it from the official website https://www.python.org/downloads/ Download the appropriate installer for your operating system. Once the download is complete, run the installer and follow the prompts to complete the installation process.
Next, you need to install the requests library. Run the following command at the command prompt:
pip install requestsIf you need to use a proxy, please add the proxy settings when running the above command:
pip install requests --proxy http://user:password@proxy_url:proxy_portPlease note that "user" and "password" here are your proxy username and password, and "proxy_url" and "proxy_port" are your proxy server address and port number.
After completing the above steps, re-run your Python program and you should be able to successfully import the requests library.