gpt4 book ai didi

python - 无法安装 Pip 包

转载 作者:行者123 更新时间:2023-12-04 18:48:23 24 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





Installing specific package version with pip

(11 个回答)


7 个月前关闭。
社区在 7 个月前审查了是否重新打开此问题并将其关闭:

原始关闭原因未解决





在 ubuntu 机器上,我无法在包上执行 pip 安装 (genie)。
版本21.8存在。

❯ pip3 install genie==
ERROR: Could not find a version that satisfies the requirement genie==
(from versions: 1.0.0, 20.2, 20.4, 20.4.1, 20.5, 20.6, 20.6.1, 20.7, 20.8, 20.8.1b0, 20.8.1b1, 20.9, 20.10, 20.10.1b0, 20.12, 20.12.2, 21.1, 21.1.1, 21.1.2, 21.1.3, 21.2, 21.2.1, 21.2.2, 21.2.3, 21.3, 21.3.1, 21.3.2b1, 21.4, 21.5, 21.5.2, 21.6, 21.7, 21.8, 21.8.1, 21.8.2, 21.9, 21.10)
但是,如果我为它进行安装,我会得到:
$ pip install genie==21.8
ERROR: Could not find a version that satisfies the requirement genie==21.8 (from versions: 1.0.0)
ERROR: No matching distribution found for genie==21.8
如果我使用 python3 pip install ...,问题是一样的.从向 pip install 添加详细信息,我看到:
Skipping link: none of the wheel's tags match: cp39-cp39-macosx_10_16_x86_64: https://files.pythonhosted.org/packages/4f/27/6cc3037d4247a58d6e9b2fd8d7c987b7e326f9ff9c429609414e45a04f52/genie-21.10-cp39-cp39-macosx_10_16_x86_64.whl#sha256=fe83befdbe20d41b7c05ecd338bd277f813023be934be1ebb8b47df3deb89a16 (from https://pypi.org/simple/genie/) (requires-python:>=3.5)
Skipping link: none of the wheel's tags match: cp39-cp39-manylinux1_x86_64: https://files.pythonhosted.org/packages/71/4b/45839aa84359c55fe6008dc6868f1928577edd786b832c7e67db9169e90c/genie-21.10-cp39-cp39-manylinux1_x86_64.whl#sha256=04b4155c066d530b48508989d3c1f074b4bb312cfb12d7a7fb8bd5698aad551e (from https://pypi.org/simple/genie/) (requires-python:>=3.5)
Given no hashes to check 0 links for project 'genie': discarding no candidates
ERROR: Could not find a version that satisfies the requirement genie==21.8 (from versions: 1.0.0)
Cleaning up...
Removed build tracker: '/tmp/pip-req-tracker-zz5x89tb'
ERROR: No matching distribution found for genie==21.8
Exception information:
Traceback (most recent call last):
File "/home/dir/net-guide/venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 186, in _main
status = self.run(options, args)
File "/home/dir/net-guide/venv/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 357, in run
resolver.resolve(requirement_set)
File "/home/dir/net-guide/venv/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "/home/dir/net-guide/venv/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/dir/net-guide/venv/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 281, in _get_abstract_dist_for
req.populate_link(self.finder, upgrade_allowed, require_hashes)
File "/home/dir/net-guide/venv/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 249, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/home/dir/net-guide/venv/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 926, in find_requirement
raise DistributionNotFound(
pip._internal.exceptions.DistributionNotFound: No matching distribution found for genie==21.8
有什么建议么?

最佳答案

python3 -m pip install genie==21.8
在我的 Linux 机器上运行良好。也许指定你想使用的python3的版本,并通过 -m调用pip .

关于python - 无法安装 Pip 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70297950/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com