腾讯云上python3.6, 使用pip3.6 install paramiko报错
[root@VM-0-14-centos test]# pip3.6 install paramiko
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3.6 install --user` instead.
Collecting paramiko
Downloading http://mirrors.tencentyun.com/pypi/packages/96/6e/4a52a8923d840107024b844d83502dfa6a1e5399ad31cf9d1a4ddbaaa7e5/paramiko-3.4.1-py3-none-any.whl (226kB)
100% |████████████████████████████████| 235kB 2.0MB/s
Collecting bcrypt>=3.2 (from paramiko)
Downloading http://mirrors.tencentyun.com/pypi/packages/8c/ae/3af7d006aacf513975fd1948a6b4d6f8b4a307f8a244e1a3d3774b297aad/bcrypt-4.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 bcrypt:
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-w4zqpe9w/bcrypt/setup.py", line 11, 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-w4zqpe9w/bcrypt/
[root@VM-0-14-centos test]# cat /tmp/pip-build-w4zqpe9w/bcrypt/setup.py
cat: /tmp/pip-build-w4zqpe9w/bcrypt/setup.py: No such file or directory
安装 paramiko 时遇到了问题,缺少 setuptools_rust 模块。这个模块是 bcrypt 库的一部分,用于编译其 C 扩展。
升级 pip 和 setuptools:
确保使用的是最新版本的 pip 和 setuptools,因为旧版本可能会导致安装失败。
pip3.6 install --upgrade pip setuptools
安装 setuptools_rust:
直接安装 setuptools_rust 模块。
pip3.6 install setuptools_rust
重新安装 paramiko:
在安装了 setuptools_rust 之后,再次尝试安装 paramiko。
pip3.6 install paramiko