如何解决Cygwin:python错误:密码学构建轮失败
我正在使用 cygwin 开发 django 应用程序。我被困在包安装调用 digikey-api。 它需要安装加密包,但失败并显示以下错误消息:
generating cffi module 'build/temp.cygwin-3.2.0-x86_64-3.8/_openssl.c'
running build_rust
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
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) Read https://cryptography.io/en/latest/installation.html for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq.html
4) Ensure you have a recent Rust toolchain installed:
https://cryptography.io/en/latest/installation.html#rust
5) If you are experiencing issues with Rust for *this release only* you may
set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
=============================DEBUG ASSISTANCE=============================
error: can't find Rust compiler
If you are using an outdated pip version,it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip,run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source,try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively,rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
This package requires Rust >=1.41.0.
----------------------------------------
ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
(venv)
我一直在尝试各种解决方案,但到目前为止都没有成功(即 pip install --upgrade pip 没有解决问题)。 有趣的是,它在这个 python 虚拟环境中失败了。但是在这个环境之外它是成功的(相同的python版本3.8.10)。
感谢您帮助解决这个问题。 塞巴斯蒂安
解决方法
信息很明确
error: can't find Rust compiler
由于 Cygwin 没有 Rust 编译器,因此您无法构建它
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。