ztane / python-Levenshtein

The Levenshtein Python C extension module contains functions for fast computation of Levenshtein distance and string similarity
GNU General Public License v2.0
1.26k stars 155 forks source link

pipenv install python-Levenshtein fail #50

Open morganednl opened 4 years ago

morganednl commented 4 years ago

I tried to install python-Levenshtein with pipenv and I had the following error:

Installing python-Levenshtein…
Adding python-Levenshtein to Pipfile's [packages]…
✔ Installation Succeeded 
Pipfile.lock (f6f41b) out of date, updating to (16ee0e)…
Locking [dev-packages] dependencies…
✔ Success! 
Locking [packages] dependencies…
✘ Locking Failed! 
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/resolver.py", line 69, in resolve
[pipenv.exceptions.ResolutionFailure]:       req_dir=requirements_dir
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/utils.py", line 726, in resolve_deps
[pipenv.exceptions.ResolutionFailure]:       req_dir=req_dir,
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree = resolver.resolve()
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/utils.py", line 395, in resolve
[pipenv.exceptions.ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]:       pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches levensthein
[pipenv.exceptions.ResolutionFailure]:       No versions found
[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: Could not find a version that matches levensthein
No versions found
Was https://pypi.org/simple reachable?
[pipenv.exceptions.ResolutionFailure]:       req_dir=requirements_dir
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/utils.py", line 726, in resolve_deps
[pipenv.exceptions.ResolutionFailure]:       req_dir=req_dir,
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/utils.py", line 480, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree = resolver.resolve()
[pipenv.exceptions.ResolutionFailure]:   File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/utils.py", line 395, in resolve
[pipenv.exceptions.ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]:       pipenv.exceptions.ResolutionFailure: ERROR: ERROR: Could not find a version that matches levensthein
[pipenv.exceptions.ResolutionFailure]:       No versions found
[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: Could not find a version that matches levensthein
No versions found
Was https://pypi.org/simple reachable?

In the PipFile I had:

python-levenshtein = "*"

By adding an uppercase, it finally worked:

python-Levenshtein = "*"
systemcatch commented 4 years ago

The name of the package on pypi is python-Levenshtein, so it will always need to be specified as that in the pipfile.

morganednl commented 4 years ago

The issue is when I run the command pipenv install python-Levenshtein this error occurs because the name in the PipFile automatically became python-levenshtein. I had to change it manually and run pipenv install again.

Le jeu. 6 févr. 2020 à 19:30, Chris notifications@github.com a écrit :

The name of the package on pypi https://pypi.org/project/python-Levenshtein/ is python-Levenshtein, so it will always need to be specified as that in the pipfile.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ztane/python-Levenshtein/issues/50?email_source=notifications&email_token=AEWYTCFQDZN5M55WFEPB64LRBRJLNA5CNFSM4KQL5XH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELAJBPQ#issuecomment-583045310, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEWYTCFSMEJRJSTL5PTOQMLRBRJLNANCNFSM4KQL5XHQ .

systemcatch commented 4 years ago

@morganednl that sounds like an issue with pipenv not respecting uppercase letters in the package name, seems like this has occurred before https://github.com/pypa/pipenv/issues/1314