如何解决可以从 pipenv 安装特定版本的 Tensorflow,但不能从 Pipfile 安装
非常奇怪的错误,我可以使用命令从 pipenv 安装 tensorflow==2.4.1
pipenv install tensorflow==2.4.1
但是当我把它放在一个 pipfile 的格式中时:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
tensorflow = "==2.4.1"
[requires]
python_version = "3.8"
然后我运行命令:
pipenv lock --clear
pipenv --rm
pipenv install
我明白了:
Pipfile.lock (bf56f7) out of date,updating to (0575f6)...
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 tensorflow==2.4.1 (from -r /var/folders/m6/kqrmfdj12x79gmbbq6f2m1ph0000gn/T/pipenvxgupglu4requirements/pipenv-puyj_a_j-constraints.txt (line 2)) (from versions: none)
[ResolutionFailure]: File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/resolver.py",line 741,in _main
[ResolutionFailure]: resolve_packages(pre,clear,verbose,system,write,requirements_dir,packages,dev)
[ResolutionFailure]: File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/resolver.py",line 702,in resolve_packages
[ResolutionFailure]: results,resolver = resolve(
[ResolutionFailure]: File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/resolver.py",line 684,in resolve
[ResolutionFailure]: return resolve_deps(
[ResolutionFailure]: File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/utils.py",line 1395,in resolve_deps
[ResolutionFailure]: results,hashes,markers_lookup,resolver,skipped = actually_resolve_deps(
[ResolutionFailure]: File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/utils.py",line 1108,in actually_resolve_deps
[ResolutionFailure]: resolver.resolve()
[ResolutionFailure]: File "/usr/local/Cellar/pipenv/2020.11.15/libexec/lib/python3.9/site-packages/pipenv/utils.py",line 833,in resolve
[ResolutionFailure]: raise ResolutionFailure(message=str(e))
[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: No matching distribution found for tensorflow==2.4.1 (from -r /var/folders/m6/kqrmfdj12x79gmbbq6f2m1ph0000gn/T/pipenvxgupglu4requirements/pipenv-puyj_a_j-constraints.txt (line 2))
我已承诺让 pipenv 工作,并且不适合其他包管理解决方案。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。