【发布时间】:2022-02-19 06:40:45
【问题描述】:
我对@987654323@ 如何解析可用的软件包版本感到困惑。我指定了索引,并且在他们的下载站点的列表中清楚地看到了 0.8.1 版本
这是我的pipenv 版本。我在 Mac OSX 上运行并通过brew 安装了 pipenv。
~ pipenv --version
pipenv, version 2021.5.29
点文件
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[[source]]
name = "pytorch"
url = "https://download.pytorch.org/whl/torch_stable.html"
verify_ssl = false
[packages]
...
torch = {index="pytorch", version="==1.7.1"}
torchtext = {index="pytorch", version="==0.8.1"}
...
[dev-packages]
[requires]
python_version = "3.7"
我运行pipenv install时的错误:
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed!
CRITICAL:pipenv.patched.notpip._internal.index.package_finder:Could not find a version that satisfies the requirement torchtext==0.8.1 (from -r /var/folders/0q/10lqt8nn6_l87q71lx_d233r0000gn/T/pipenv2ix9if8erequirements/pipenv-qm980cdf-constraints.txt (line 7)) (from versions: 0.1.1, 0.2.0, 0.2.1, 0.2.3, 0.3.1, 0.4.0, 0.5.0, 0.6.0)
[ResolutionFailure]: File "/usr/local/Cellar/pipenv/2021.5.29/libexec/lib/python3.9/site-packages/pipenv/resolver.py", line 741, in _main
...
错误告诉我找不到 0.8.1,我只能从超级有限的集合中选择。为什么是这样?我该怎么做才能解决这个问题?
【问题讨论】:
-
我遇到了同样的问题,同时收到此错误
CRITICAL:pipenv.patched.notpip._internal.resolution.resolvelib.factory:Could not find a version that satisfies the requirement torch~=1.7.1 (from versions: 1.9.0, 1.10.0, 1.10.1)您找到解决方案了吗? -
@andrea 查看我的回答。修复起来真的很简单。 :)
标签: python python-3.x pytorch pipenv