如何修复“错误:找不到与安装匹配的版本"? [英] How to fix "ERROR: Could not find a version that matches install"?

查看:68
本文介绍了如何修复“错误:找不到与安装匹配的版本"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 pipenv 安装 django-crispy-forms.

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

它安装是因为当我运行pip freeze"命令时我看到了它.

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

什么时候锁定 [packages] 依赖项......

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?

我尝试运行以下命令建议 [pipenv install --skip-lock 和 pipenv install --skip-lock] 但我仍然遇到相同的错误.

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

如何解决这个问题,因为我想在 Heroku 上部署项目,但我不知道这是否会阻止项目部署?

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?

推荐答案

尝试从 pipfile 中删除给您带来问题的库,检查您是否有拼写错误.

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

pipenv install "any-library" 会将 "any-library" 插入到 pipfile 中,即使它不存在,这可能是错误的原因之一,

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,

示例:$ pipenv 安装任意库

example: $ pipenv install any-library

错误:错误:找不到与任何库匹配的版本

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

这篇关于如何修复“错误:找不到与安装匹配的版本"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆