Failed building wheel for bcrypt when running pip install paramiko

330 views Asked by At

I'm trying run pip install paramiko, but i'm running into the following error : please help me, i already tried pip update, installing rust. it keep returning this kind of error. i already tried to use pip install pysftp too but the error is same.

    =============================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
1

There are 1 answers

1
Emre Ozgun On

The problem comes with bcrypt 4.0.0

You can fixing with downgrade bcrypt to 3.2.2 (the latest version before 4.0.0) fixed this for me.

$ pip install bcrypt~=3.2.2
$ pip3 install bcrypt~=3.2.2

It worked for me.