gpt4 book ai didi

python - 无法在我的 Raspberry Pi 上使用 pip 安装 Flask

转载 作者:太空宇宙 更新时间:2023-11-04 10:06:10 25 4
gpt4 key购买 nike

我正在尝试在我的 Raspberry Pi 上安装 Flask,但似乎无法使用以下命令:sudo pip install flask。我总是回复这条消息:

Downloading/unpacking flask
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1178, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 194, in find_requirement
page = self._get_page(main_index_url, req)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_page
session=self.session,
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 694, in get_page
req, link, "connection error: %s" % exc, url,
TypeError: __str__ returned non-string (type Error)

Storing debug log for failure in /root/.pip/pip.log

有人知道出了什么问题吗?

最佳答案

这个问题描述here .简而言之,解决方法是正确设置日期,例如:

sudo date +%Y%m%d -s "20180920"

希望对您有所帮助!

关于python - 无法在我的 Raspberry Pi 上使用 pip 安装 Flask,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52419481/

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