pipenv - 如何修复 "ERROR: Could not find a version that matches install"?

标签 pipenv

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

它安装是因为当我运行“pip Frozen”命令时,我看到了它。

是时候锁定[packages]依赖项了...

它面临锁定,并且出现此错误。

[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],但仍然出现相同的错误。

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

最佳答案

尝试从pipfile中删除出现问题的库,检查是否有错字。

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

例子:
$ pipenv安装任何库

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

关于pipenv - 如何修复 "ERROR: Could not find a version that matches install"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54494286/

相关文章:

python - Visual Studio Code 的调试器和 pipenv

python - 在/tmp/pip-build-rnhk49o3/opencv-python/中,命令 "python setup.py egg_info"失败,错误代码为1

python - 将私有(private) devpi 服务器与 pipenv 结合使用

python - Pipenv vs setup.py

docker - "docker-compose up"构建失败,命令 '/bin/sh -c pipenv install' 返回非零代码 : 1

python - 如何在 ubuntu 的 cronjob 中运行 pipenv?

python - Pipenv安装错误: Command "python setup.py egg_info" failed with error code 1 in

java - 在同一个项目中组织时如何单独打包python模块?

django - Pipenv 无法在远程服务器上安装 boto3 (Heroku)

azure-pipelines - 您可以在 Azure Pipeline 步骤中使用 pipenv 来安装依赖项吗?