I’m trying to install paramiko in Cygwin and one of the build dependencies is bcrypt. I have rustc installed and I believe all of the supporting build libraries.
Pip is also updated to the latest.
JavaScript
x
3
1
$ pip --version
2
pip 22.2.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
3
I use the following pip command:
JavaScript
1
2
1
pip install bcrypt
2
And I get the following error output:
JavaScript
1
35
35
1
error: failed to run custom build command for `pyo3-build-config v0.15.2`
2
3
Caused by:
4
process didn't exit successfully: `C:Cygwin64tmppip-install-19d9duslbcrypt_117761e212a240d8804ceae0beeb39c1src_bcrypttargetreleasebuildpyo3-build-config-2ef06b5f5d02e46bbuild-script-build` (exit code: 1)
5
--- stdout
6
cargo:rerun-if-env-changed=PYO3_CONFIG_FILE
7
cargo:rerun-if-env-changed=PYO3_NO_PYTHON
8
cargo:rerun-if-env-changed=PYO3_PYTHON
9
10
--- stderr
11
error: failed to run the Python interpreter at /usr/bin/python.exe: The system cannot find the path specified. (os error 3)
12
warning: build failed, waiting for other jobs to finish
13
cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/_bcrypt/Cargo.toml --release -v --features pyo3/abi3-py36 pyo3/extension-module -- --crate-type cdylib
14
15
=============================DEBUG ASSISTANCE=============================
16
If you are seeing a compilation error please try the following steps to
17
successfully install bcrypt:
18
1) Upgrade to the latest pip and try again. This will fix errors for most
19
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
20
2) Ensure you have a recent Rust toolchain installed. bcrypt requires
21
rustc >= 1.56.0.
22
23
Python: 3.8.12
24
platform: CYGWIN_NT-10.0-19044-3.3.5-341.x86_64-x86_64-64bit-WindowsPE
25
pip: n/a
26
setuptools: 65.3.0
27
setuptools_rust: 1.5.1
28
rustc: 1.63.0 (4b91a6ea7 2022-08-08)
29
=============================DEBUG ASSISTANCE=============================
30
31
error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/_bcrypt/Cargo.toml --release -v --features 'pyo3/abi3-py36 pyo3/extension-module' -- --crate-type cdylib` failed with code 101
32
[end of output]
33
34
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
35
I check my python installation (python.exe) and it is installed at /usr/bin/python.exe.
JavaScript
1
5
1
$ ls /usr/bin/python*
2
/usr/bin/python.exe /usr/bin/python2.7.exe /usr/bin/python3.8-config
3
/usr/bin/python2-config /usr/bin/python3 /usr/bin/python3.8.exe
4
/usr/bin/python2.7-config /usr/bin/python3-config
5
So I am confused…..what is the issue? Why can’t it find my python interpreter? Why is bcrypt not building and installing?
Advertisement
Answer
I’m guessing that Cygwin causes some compatibility issues here.
It looks like Cygwin has a package for this purpose, likely to avoid these issues: