Ubuntu安装python3的包paramiko报错Unknown distribution option: ‘cffi_modules‘

Ubuntu 安装paramiko时候报错。

root/root# python3 xxx.py

Traceback (most recent call last):
  File "xxx.py", line 4, in <module>
    import paramiko
ModuleNotFoundError: No module named 'paramiko'

root/root# pip3 install paramiko

Collecting paramiko
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/56/7c/9dd558ec0869fcecb661765d0a2504978dbfe85de24cbcccc847aa9b58e4/paramiko-3.1.0-py3-none-any.whl (211kB)
    100% |████████████████████████████████| 215kB 20.3MB/s 
Collecting cryptography>=3.3 (from paramiko)
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/fa/f3/f4b8c175ea9a1de650b0085858059050b7953a93d66c97ed89b93b232996/cryptography-39.0.2.tar.gz (604kB)
    100% |████████████████████████████████| 614kB 35.6MB/s 
    Complete output from command python setup.py egg_info:
    /usr/local/lib/python3.6/dist-packages/setuptools/dist.py:726: UserWarning: Usage of dash-separated 'index-url' will not be supported in future versions. Please use the underscore name 'index_url' instead
      % (opt, underscore_opt)
    /usr/lib/python3.6/importlib/__init__.py:126: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography (40.0) will be the last to support Python 3.6.
      return _bootstrap._gcd_import(name[level:], package, level)
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-kts8f25b/cryptography/setup.py", line 63, in <module>
        rust_version=">=1.48.0",
      File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/local/lib/python3.6/dist-packages/setuptools/dist.py", line 463, in __init__
        for k, v in attrs.items()
      File "/usr/lib/python3.6/distutils/dist.py", line 261, in __init__
        warnings.warn(msg)
    UserWarning: Unknown distribution option: 'cffi_modules'
    
        =============================DEBUG ASSISTANCE=============================
        If you are seeing a compilation error please try the following steps to
        successfully install cryptography:
        1) 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
        2) Read https://cryptography.io/en/latest/installation/ for specific
           instructions for your platform.
        3) Check our frequently asked questions for more information:
           https://cryptography.io/en/latest/faq/
        4) Ensure you have a recent Rust toolchain installed:
           https://cryptography.io/en/latest/installation/#rust
    
        Python: 3.6.9
        platform: Linux-4.15.0-163-generic-x86_64-with-Ubuntu-18.04-bionic
        pip: 9.0.1
        setuptools: 59.6.0
        setuptools_rust: 1.1.2
        rustc: n/a
        =============================DEBUG ASSISTANCE=============================
    
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-kts8f25b/cryptography/

当前提示是说 Unknown distribution option: ‘cffi_modules’
未知的分发选项:“cffi_modules”
解决:
1.pip3 install cffi
2.pip install --upgrade pip
3.再次pip3 install paramiko
搞定。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

镜中先生

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值