zoukankan      html  css  js  c++  java
  • 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环境问题。

    解决方法:暂无。

  • 相关阅读:
    js比较两个String字符串找出不同,并将不同处高亮显示
    C# 去掉webapi返回json所带的转义字符
    .Net C#向远程服务器Api上传文件
    Access-Control-Allow-Origin,跨域
    ajax时间戳或随机数
    SqlServer收缩日志文件
    MsDepSvc 启动失败
    SqlServer收缩数据库语句
    sql server datetime类型字段使用isnull返回1900-01-01 00:00:00.000的问题
    EXCEPTION与ERROR的区别
  • 原文地址:https://www.cnblogs.com/chalon/p/15072782.html
Copyright © 2011-2022 走看看