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环境问题。

    解决方法:暂无。

  • 相关阅读:
    Leetcode(680) ;验证回文字符串 Ⅱ
    mysql常用操作语句
    组合索引问题
    php生成一维码以及保存-转载
    php后台实现页面跳转的方法-转载
    php操作表格(写)
    虚拟机复制后上网冲突的问题
    centos下安装nginx(转载)
    虚拟机与宿主机可以互相ping通,但是外网不能
    防火墙设置:虚拟机ping不通主机,但是主机可以ping通虚拟机(转载)
  • 原文地址:https://www.cnblogs.com/chalon/p/15072782.html
Copyright © 2011-2022 走看看