python故障排查
2021/7/28 22:05:52
本文主要是介绍python故障排查,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
问题1:安装python模块失败,强制升级pip也失败?
[root@controller flask_hello]# pip install flask
Collecting flask
Using cached https://files.pythonhosted.org/packages/c0/df/c516b5f38a670b6b0de604c2637ed5860db03692c2f8542fd1f60c2552a7/Flask-2.0.1.tar.gz
Collecting Werkzeug>=2.0 (from flask)
Using cached https://files.pythonhosted.org/packages/e3/bd/a49e5f756b2f29010b5be321fe02478660dbf8fefea3f078493c86011b5f/Werkzeug-2.0.1.tar.gz
Complete output from command python setup.py egg_info:
error in Werkzeug setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-sx0rpZ/Werkzeug/
You are using pip version 8.1.2, however version 21.2.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
You should consider upgrading via the 'pip install --upgrade pip' command.
[root@controller flask_hello]# pip install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/f7/ce/e359cf283c0c0f2e0af7df8f16c8d79047aa1887a00a5b39b27d8afc49e2/pip-21.2.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-wmFaWf/pip/setup.py", line 7
def read(rel_path: str) -> str:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-wmFaWf/pip/
You are using pip version 8.1.2, however version 21.2.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[root@controller flask_hello]# python -m pip install --upgrade --force pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/f7/ce/e359cf283c0c0f2e0af7df8f16c8d79047aa1887a00a5b39b27d8afc49e2/pip-21.2.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-q4J0ib/pip/setup.py", line 7
def read(rel_path: str) -> str:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-q4J0ib/pip/
You are using pip version 8.1.2, however version 21.2.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
原因分析:python环境问题。
解决方法:暂无。
这篇关于python故障排查的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-25Python编程基础:变量与类型
- 2024-11-25Python编程基础与实践
- 2024-11-24Python编程基础详解
- 2024-11-21Python编程基础教程
- 2024-11-20Python编程基础与实践
- 2024-11-20Python编程基础与高级应用
- 2024-11-19Python 基础编程教程
- 2024-11-19Python基础入门教程
- 2024-11-17在FastAPI项目中添加一个生产级别的数据库——本地环境搭建指南
- 2024-11-16`PyMuPDF4LLM`:提取PDF数据的神器