pip安装python扩展包失败pip install openpyxl HTTPSConnectionPool Read timed out
pip install python-pptx 或 python3 -m pip install --upgrade python-pptx。pip install python-docx 或 python3 -m pip install --upgrade python-docx。使用国内的 PyPI 镜像源可能会改善下载速度。本地执行:python3 word.py https://a.cn/
pip install openpyxl
Collecting openpyxl
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fea6e1b0a00>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /packages/6a/94/a59521de836ef0da54aaf50da6c4da8fb4072fb3053fa71f052fd9399e7a/openpyxl-3.1.2-py2.py3-none-any.whl
File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/urllib3/response.py", line 443, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out
使用国内源:
使用国内的 PyPI 镜像源可能会改善下载速度。你可以使用清华大学的 PyPI 镜像,通过以下命令配置:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ python-docx
然后再执行:
pip install openpyxl 或者 python3 -m pip install openpyxl
pip install PyMuPDF 或 python3 -m pip install PyMuPDF
pip install python-pptx 或 python3 -m pip install --upgrade python-pptx
pip install python-docx 或 python3 -m pip install --upgrade python-docx
本地执行:python3 word.py https://a.cn/a.docx

GitCode 天启AI是一款由 GitCode 团队打造的智能助手,基于先进的LLM(大语言模型)与多智能体 Agent 技术构建,致力于为用户提供高效、智能、多模态的创作与开发支持。它不仅支持自然语言对话,还具备处理文件、生成 PPT、撰写分析报告、开发 Web 应用等多项能力,真正做到“一句话,让 Al帮你完成复杂任务”。
更多推荐
所有评论(0)