Tools, FAQ, Tutorials:
Installing 'requests' Module
How to install "requests" module? I am getting the "ModuleNotFoundError: No module named 'requests'" error.
✍: FYIcenter.com
If you are getting the following error when running "import requests",
you need to follow this tutorial to install the "requests" module.
C:\fyicenter>python Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] >>> import requests Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'requests'
1. Check installed modules with "pip" command:
C:\fyicenter>pip list pip (9.0.1) setuptools (28.8.0)
2. Install "requests" with "pip" command:
C:\fyicenter>pip install requests
Collecting requests
Downloading https://files.pythonhosted.org/packages/65/47/...
.../requests-2.19.1-py2.py3-none-any.whl (91kB)
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Downloading https://files.pythonhosted.org/packages/bc/a9/...
.../chardet-3.0.4-py2.py3-none-any.whl (133kB)
Collecting urllib3<1.24,>=1.21.1 (from requests)
Downloading https://files.pythonhosted.org/packages/bd/c9/...
.../urllib3-1.23-py2.py3-none-any.whl (133kB)
Collecting certifi>=2017.4.17 (from requests)
Downloading https://files.pythonhosted.org/packages/7c/e6/...
.../certifi-2018.4.16-py2.py3-none-any.whl(150kB)
Collecting idna<2.8,>=2.5 (from requests)
Downloading https://files.pythonhosted.org/packages/4b/2a/...
.../idna-2.7-py2.py3-none-any.whl (58kB)
Installing collected packages: chardet, urllib3, certifi, idna, requests
Successfully installed certifi-2018.4.16 chardet-3.0.4 idna-2.7
requests-2.19.1 urllib3-1.23
3. Check installed modules again. The output shows requests-2.19.1 is installed. And its supporting modules are also installed.
C:\fyicenter>pip list certifi (2018.4.16) chardet (3.0.4) idna (2.7) pip (9.0.1) requests (2.19.1) setuptools (28.8.0) urllib3 (1.23)
⇒ Sending an HTTP Request with 'requests'
⇐ What Is Python Module 'requests'
2018-09-01, ∼2948🔥, 0💬
Popular Posts:
How to create Hello-3.1.epub with WinRAR? I have all required files to create Hello-3.1.epub. To cre...
How To Remove Slashes on Submitted Input Values in PHP? By default, when input values are submitted ...
How to use the "find-and-replace" Policy Statement for an Azure API service operation? The "find-and...
What Azure AD App Registration Manifest? Azure AD App Registration Manifest is JSON file that contai...
How To Create an Array with a Sequence of Integers or Characters in PHP? The quickest way to create ...