I have read this question.
I installed pip and I executed
pip install requestsand got
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/local/lib/python2.7/dist-packages/requests-2.9.1-py2.7.egg Cleaning up...I started my Python 2 shell:
>>> from urllib.request import urlopen Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named request
Why am I still catching this exception? What I am doing wrong?
request' vs 'requests' (the latter with 's'): See e.g. Several malicious typosquatted Python libraries found on PyPI repository. That is, 'requests' (the real library) vs. 'request' (the malicious one). It is no wonder the typosquatting attack was successful.