[PYTHON] When I run pipenv install <package name>, I get a "No matching distribution found for <package name>" error.

Event

When I run the pipenv install <package name> command to install a package with Pipenv, I get a "No matching distribution found for " error as shown below.

$ pipenv install urllib==1.25
Installing urllib==1.25…
Adding urllib to Pipfile's [packages]…
✔ Installation Succeeded 
Pipfile.lock (dff900) out of date, updating to (ca72e7)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✘ Locking Failed! 
CRITICAL:pipenv.patched.notpip._internal.index:Could not find a version that satisfies the requirement urllib==1.25 (from versions: )
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/lib/python3.6/site-packages/pipenv/resolver.py", line 85, in _main
[pipenv.exceptions.ResolutionFailure]:       requirements_dir=requirements_dir,
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/lib/python3.6/site-packages/pipenv/resolver.py", line 69, in resolve
[pipenv.exceptions.ResolutionFailure]:       req_dir=requirements_dir
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/lib/python3.6/site-packages/pipenv/utils.py", line 726, in resolve_deps
[pipenv.exceptions.ResolutionFailure]:       req_dir=req_dir,
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/lib/python3.6/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree = resolver.resolve()
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/lib/python3.6/site-packages/pipenv/utils.py", line 395, in resolve
[pipenv.exceptions.ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: ERROR: No matching distribution found for urllib==1.25
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/lib/python3.6/site-packages/pipenv/resolver.py", line 85, in _main
[pipenv.exceptions.ResolutionFailure]:       requirements_dir=requirements_dir,
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/lib/python3.6/site-packages/pipenv/resolver.py", line 69, in resolve
[pipenv.exceptions.ResolutionFailure]:       req_dir=requirements_dir
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/lib/python3.6/site-packages/pipenv/utils.py", line 726, in resolve_deps
[pipenv.exceptions.ResolutionFailure]:       req_dir=req_dir,
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/lib/python3.6/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree = resolver.resolve()
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/lib/python3.6/site-packages/pipenv/utils.py", line 395, in resolve
[pipenv.exceptions.ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
 Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: ERROR: No matching distribution found for urllib==1.25

Cause / Solution

The cause was that I wanted to make a mistake in the package name.

--Error: ʻurllib == 1.25 --Correct: ʻurllib3 == 1.25

After specifying the correct package name, the package was successfully installed.

$ pipenv install urllib3==1.25
Creating a Pipfile for this project…
Installing urllib3==1.25…
Adding urllib3 to Pipfile's [packages]…
✔ Installation Succeeded 
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✔ Success! 
Updated Pipfile.lock (053760)!
Installing dependencies from Pipfile.lock (053760)…
     ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:00

that's all

Recommended Posts

When I run pipenv install <package name>, I get a "No matching distribution found for <package name>" error.
When I get a chromedriver error in Selenium
What to do if you get a "No versions found" error in pipenv
In the Chainer tutorial, I get an error when importing a package. (mock)
I get an error when trying to install maec 4.0.1.0 with pip
I get a Python No module named'encodings' error with the aws command
When I get an error with PyInstaller
When I name the file flask.py in Flask, I get Import Error: cannot import name'Flask'
I get a UnicodeDecodeError when running with mod_wsgi
I get a "bash: sudo: command not found" error on LINUX (Debian) built on Docker
How to deal with "Type Error: No matching signature found" error when using pandas fillna
When I try to import pandas on macOS I get the error No module named'_bz2'
When I try to install mysqlclient with Django, I get error: command'gcc' failed with exit status 1.