How to fix “ERROR: Could not find a version that matches install”?

我怕爱的太早我们不能终老 提交于 2020-05-27 06:06:52

问题


I am trying to install django-crispy-forms using pipenv.

It installs because when I run "pip freeze" command I see it.

when it is time to Locking [packages] dependencies…

It faces to lock and I get this error.

[pipenv.exceptions.ResolutionFailure]:   File "c:/users/rapture c. 
godson/appdat
a/local/programs/python/python37-32/lib/site- 
packages/pipenv/resolver.py", line
69, in resolve
[pipenv.exceptions.ResolutionFailure]:       req_dir=requirements_dir
[pipenv.exceptions.ResolutionFailure]:   File "c:\users\rapture c. 
godson\appdat
a\local\programs\python\python37-32\lib\site-packages\pipenv\utils.py", 
line 726
, in resolve_deps
[pipenv.exceptions.ResolutionFailure]:       req_dir=req_dir,
[pipenv.exceptions.ResolutionFailure]:   File "c:\users\rapture c. 
godson\appdat
a\local\programs\python\python37-32\lib\site-packages\pipenv\utils.py", 
line 480
, in actually_resolve_deps
[pipenv.exceptions.ResolutionFailure]:       resolved_tree = 
resolver.resolve()
[pipenv.exceptions.ResolutionFailure]:   File "c:\users\rapture c. 
godson\appdat
a\local\programs\python\python37-32\lib\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 install
[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 install
No versions found
Was https://pypi.org/simple reachable?

I have tried running the following commands suggest[pipenv install --skip-lock and pipenv install --skip-lock] but I still get the same error.

how can this be fixed because I want to deploy the project on Heroku and I don't know if this will prevents the project from deploying?


回答1:


Try to remove from pipfile the library that gives you the problem, check if you have a typo.

pipenv install "any-library" will insert "any-library" to the pipfile even if it does not exist, that could be one reason for the error,

example: $ pipenv install any-library

ERROR: ERROR: Could not find a version that matches any-library



来源:https://stackoverflow.com/questions/54494286/how-to-fix-error-could-not-find-a-version-that-matches-install

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!