python安装paramiko报错
腾讯云上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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义