• Command "python setup.py egg_info" failed with error code 1 in /tmp/pipbuild6kprz019/cryptography/【pip装包报错】


    出现的问题

    ┌──[root@liruilongs.github.io]-[~]
    └─$ python3 -m pip install paramiko
    WARNING: Running pip install with root privileges is generally not a good idea. Try `__main__.py install --user` instead.
    Collecting paramiko
      Using cached https://files.pythonhosted.org/packages/60/3e/84c52fb09db84548c5d366bac8863125c6db099b87495e04c8af5527e6f1/paramiko-2.9.2-py2.py3-none-any.whl
    Collecting bcrypt>=3.1.3 (from paramiko)
      Downloading https://files.pythonhosted.org/packages/52/a7/51ab6481ac355517696477889d8ab232106a0ddadda642c54e47a2ab40b9/bcrypt-3.2.0-cp36-abi3-manylinux1_x86_64.whl (63kB)
        100% |████████████████████████████████| 71kB 300kB/s
    Collecting cryptography>=2.5 (from paramiko)
      Using cached https://files.pythonhosted.org/packages/f9/4b/1cf8e281f7ae4046a59e5e39dd7471d46db9f61bb564fddbff9084c4334f/cryptography-36.0.1.tar.gz
        Complete output from command python setup.py egg_info:
    
                =============================DEBUG ASSISTANCE==========================
                If you are seeing an error here please try the following to
                successfully install cryptography:
    
                Upgrade to the latest pip and try again. This will fix errors for most
                users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
                =============================DEBUG ASSISTANCE==========================
    
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-build-6kprz019/cryptography/setup.py", line 14, in <module>
            from setuptools_rust import RustExtension
        ModuleNotFoundError: No module named 'setuptools_rust'
    
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-6kprz019/cryptography/
    

    解决办法

    ┌──[root@liruilongs.github.io]-[~]
    └─$ sudo python3 -m pip install --upgrade --force pip
    WARNING: Running pip install with root privileges is generally not a good idea. Try `__main__.py install --user` instead.
    Collecting pip
      Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB)
        100% |████████████████████████████████| 1.7MB 77kB/s
    Installing collected packages: pip
    Successfully installed pip-21.3.1
    
    ┌──[root@liruilongs.github.io]-[~]
    └─$ sudo python3 -m  pip install setuptools==33.1.1
    Collecting setuptools==33.1.1
      Downloading setuptools-33.1.1-py2.py3-none-any.whl (472 kB)
         |████████████████████████████████| 472 kB 33 kB/s
    Installing collected packages: setuptools
      Attempting uninstall: setuptools
        Found existing installation: setuptools 39.2.0
        Uninstalling setuptools-39.2.0:
          Successfully uninstalled setuptools-39.2.0
      WARNING: The scripts easy_install and easy_install-3.6 are installed in '/usr/local/bin' which is not on PATH.
      Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
    Successfully installed setuptools-33.1.1
    WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
    ┌──[root@liruilongs.github.io]-[~]
    └─$
    
    ┌──[root@liruilongs.github.io]-[~]
    └─$ python3 -m pip install paramiko
    Collecting paramiko
      Using cached paramiko-2.9.2-py2.py3-none-any.whl (210 kB)
    Collecting cryptography>=2.5
      Downloading cryptography-36.0.1-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB)
         |████████████████████████████████| 3.8 MB 52 kB/s
    Collecting bcrypt>=3.1.3
      Downloading bcrypt-3.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (61 kB)
         |████████████████████████████████| 61 kB 59 kB/s
    Collecting pynacl>=1.0.1
      Downloading PyNaCl-1.5.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
         |████████████████████████████████| 1.1 MB 41 kB/s
    Collecting cffi>=1.1
      Downloading cffi-1.15.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (405 kB)
         |████████████████████████████████| 405 kB 62 kB/s
    Collecting six>=1.4.1
      Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
    Collecting pycparser
      Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
         |████████████████████████████████| 118 kB 36 kB/s
    Installing collected packages: pycparser, six, cffi, pynacl, cryptography, bcrypt, paramiko
    Successfully installed bcrypt-3.2.0 cffi-1.15.0 cryptography-36.0.1 paramiko-2.9.2 pycparser-2.21 pynacl-1.5.0 six-1.16.0
    WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
    ┌──[root@liruilongs.github.io]-[~]
    └─$
    
  • 相关阅读:
    dimensionality reduction动机---data compression(使算法提速)
    K-means:如何选择K(cluster的数目)
    python2和python3共存方法
    docker postgresql 数据库
    转:MySQL到底能支持多大的数据量?
    数据库jdbc链接:mysql, oracle, postgresql
    python获取参数列表
    转载:ubuntu系统启动顺序,常见系统服务说明
    使用postman开发testcases记录贴
    python gevent使用例子
  • 原文地址:https://www.cnblogs.com/liruilong/p/15945107.html
Copyright © 2020-2023  润新知