gpt4 book ai didi

python - 在python : HTTPError: 404 Client Error: Not Found for url中安装任何包时出错

转载 作者:行者123 更新时间:2023-12-03 19:25:00 27 4
gpt4 key购买 nike

我正在我的 ubuntu 系统上安装 Flask,但无法安装它。得到以下错误:

异常(exception):
回溯(最近一次调用最后一次):
文件“/usr/lib/python2.7/dist-packages/pip/basecommand.py”,第 215 行,在主目录中
status = self.run(options, args)
运行中的文件“/usr/lib/python2.7/dist-packages/pip/commands/install.py”,第 353 行
wb.build(autobuilding=True)
文件“/usr/lib/python2.7/dist-packages/pip/wheel.py”,第 749 行,在构建中
self.requirement_set.prepare_files(self.finder)
文件“/usr/lib/python2.7/dist-packages/pip/req/req_set.py”,第380行,在prepare_files
ignore_dependencies=self.ignore_dependencies))
文件“/usr/lib/python2.7/dist-packages/pip/req/req_set.py”,第 554 行,在 _prepare_file 中
require_hashes
文件“/usr/lib/python2.7/dist-packages/pip/req/req_install.py”,第278行,在populate_link
self.link = finder.find_requirement(self, upgrade)
find_requirement 中的文件“/usr/lib/python2.7/dist-packages/pip/index.py”,第 465 行
all_candidates = self.find_all_candidates(req.name)
find_all_candidates 中的文件“/usr/lib/python2.7/dist-packages/pip/index.py”,第 423 行
对于 self._get_pages(url_locations, project_name) 中的页面:
_get_pages 中的文件“/usr/lib/python2.7/dist-packages/pip/index.py”,第 568 行
page = self._get_page(location)
_get_page 中的文件“/usr/lib/python2.7/dist-packages/pip/index.py”,第 683 行
返回 HTMLPage.get_page(link, session=self.session)
文件“/usr/lib/python2.7/dist-packages/pip/index.py”,第 795 行,在 get_page
resp.raise_for_status()
文件“/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py”,第935行,raise_for_status
引发 HTTPError(http_error_msg, response=self)
HTTPError:404 客户端错误:找不到 url:https://pypi.org/simple/flask/

我尝试了来自 的一些解决方案Stackoverflow 但没有什么对我有用

Unable to install any package through pip

我正在使用 ubuntu 18.04 , Python 2.7 , pip 9.0.1

最佳答案

$ pip install --upgrade pip
Cache entry deserialization failed, entry ignored
Collecting pip
Using cached https://files.pythonhosted.org/packages/54/eb/4a3642e971f404d69d4f6fa3885559d67562801b99d7592487f1ecc4e017/pip-20.3.3-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Successfully uninstalled pip-9.0.1
Successfully installed pip-20.3.3
为我解决了问题。

关于python - 在python : HTTPError: 404 Client Error: Not Found for url中安装任何包时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57602643/

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