0

Error message:

Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
ERROR: Could not find a version that satisfies the requirement request (from versions: none)
ERROR: No matching distribution found for request

!pip install request
!pip install html5lib
!pip install bs4
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • This can't be the first question of this kind. Where is the canonical duplicate? – Peter Mortensen Jun 09 '23 at 12:38
  • A candidate: *[Python error when attempting to install 'request' package using pip](https://stackoverflow.com/questions/62930315/python-error-when-attempting-to-install-request-package-using-pip)*. For example, from [an answer](https://stackoverflow.com/questions/62930315/python-error-when-attempting-to-install-request-package-using-pip/62971876#62971876): *"There is a* ***typo*** *in the article."* and *"at some point in time at least the request (without the s at the end) package contained some malware:"* – Peter Mortensen Jun 09 '23 at 12:39
  • 1
    Does this answer your question? [Python error when attempting to install 'request' package using pip](https://stackoverflow.com/questions/62930315/python-error-when-attempting-to-install-request-package-using-pip) – Peter Mortensen Jun 09 '23 at 12:40
  • There is a *real* price to be paid for typos. Related: *[Several malicious typosquatted Python libraries found on PyPI repository](https://thehackernews.com/2021/07/several-malicious-typosquatted-python.html)* – Peter Mortensen Jun 09 '23 at 12:46
  • 1
    More duplicates and similar: *[No matching distribution found for multiple packages](https://stackoverflow.com/questions/62927162/no-matching-distribution-found-for-multiple-packages/63344555#63344555)* (*"You probably unintentionally had request instead of requests in your requirements.txt file."*), *[PyCharm v4.5 cannot import name 'request'](https://stackoverflow.com/questions/30339324/)*, and *[PIP Install request RuntimeError: maximum recursion depth exceeded in Python 2.7](https://stackoverflow.com/questions/44315868/)* (*"Do you actually mean to install request and not requests?"*) – Peter Mortensen Jun 09 '23 at 13:17
  • The command line of the latter (SO 44315868) is `pip install request`. From SO 62927162 (my emphasis): *"These projects* (***request***, ***get***, ***post***) *were removed by their author and no longer exist."* – Peter Mortensen Jun 09 '23 at 13:31
  • It *may* be [more than a typo](https://stackoverflow.com/questions/44315868/pip-install-request-runtimeerror-maximum-recursion-depth-exceeded-in-python-2-7/44317024#comment134786723_44317024). It was part of [a deliberate injection attack in 2017](https://stackoverflow.com/questions/51748121/i-am-trying-to-install-setupfiles-package-from-pip/52032994#52032994). See also *[PyPI Python repository hit by typosquatting sneak attack](https://nakedsecurity.sophos.com/2017/09/19/pypi-python-repository-hit-by-typosquatting-sneak-attack/)*. Perhaps there are still remnants of it out there? – Peter Mortensen Jun 09 '23 at 14:11
  • What guide are you following? Can you provide a reference? – Peter Mortensen Jun 20 '23 at 19:29
  • One guide that contains the typo is *[New and Improved Mac OS Tutorial, Part 1 (The Basics)](https://passthroughpo.st/new-and-improved-mac-os-tutorial-part-1-the-basics/)*. But it is probably not the one used in this case. From *[Improving risks and consequences against typosquatting on pypi](https://discuss.python.org/t/improving-risks-and-consequences-against-typosquatting-on-pypi/5090)*. – Peter Mortensen Jul 03 '23 at 10:48

3 Answers3

1

This is Requests (with an "s"), hence: pip install requests should work.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Amiel
  • 261
  • 1
  • 2
  • 7
0

Use:

python -m pip install requests

Maybe you mean requests and not request!

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
M.Ryan
  • 126
  • 5
0

This module name is requests so you should type pip install requests.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131