我正在尝试运行 pip install paramiko,但遇到以下错误: 请帮助我,我已经尝试过 pip update,安装 Rust。它不断返回这种错误。我也已经尝试使用 pip install pysftp 但错误是相同的。
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install bcrypt:
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) Ensure you have a recent Rust toolchain installed. bcrypt requires
rustc >= 1.64.0. (1.63 may be used by setting the BCRYPT_ALLOW_RUST_163
environment variable)
Python: 3.9.7
platform: macOS-10.16-x86_64-i386-64bit
pip: n/a
setuptools: 69.0.2
setuptools_rust: 1.8.1
rustc: 1.74.0 (79e9716c9 2023-11-13)
=============================DEBUG ASSISTANCE=============================
error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/_bcrypt/Cargo.toml --release -v --features pyo3/extension-module --crate-type cdylib -- -C 'link-args=-undefined dynamic_lookup -Wl,-install_name,@rpath/_bcrypt.abi3.so'` failed with code 101
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for bcrypt
Failed to build bcrypt
ERROR: Could not build wheels for bcrypt, which is required to install pyproject.toml-based projects
bcrypt 4.0.0 出现问题
您可以通过将 bcrypt 降级到 3.2.2(4.0.0 之前的最新版本)来解决这个问题。
$ pip install bcrypt~=3.2.2
$ pip3 install bcrypt~=3.2.2
它对我有用。