坦笑&&life 2022-06-17 13:19 采纳率: 18.2%
浏览 983
已结题

can't find Rust compiler(pip已更新)

问题遇到的现象和发生背景

需要安装 python-gvm
期间需要安装cryptography(C++,openssl,perl,rust等都安装了,pip也更新了)
有rustc,没有racer

问题相关代码,请勿粘贴截图

一直提示:
error: can't find Rust compiler

运行结果及报错内容

pip install cryptography
Collecting cryptography
Using cached https://files.pythonhosted.org/packages/51/05/bb2b681f6a77276fc423d04187c39dafdb65b799c8d87b62ca82659f9ead/cryptography-37.0.2.tar.gz
Installing build dependencies ... done
Requirement already satisfied: cffi>=1.12 in e:\venv\lib\site-packages (from cryptography) (1.15.0)
Requirement already satisfied: pycparser in e:\venv\lib\site-packages (from cffi>=1.12->cryptography) (2.21)
paramiko 2.11.0 requires pynacl>=1.0.1, which is not installed.
Installing collected packages: cryptography
Running setup.py install for cryptography ... error
Complete output from command "E:\venv\Scripts\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\dell\AppData\Local\Temp\pip
-install-0ddejxjz\cryptography\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --reco
rd C:\Users\dell\AppData\Local\Temp\pip-record-kooagudn\install-record.txt --single-version-externally-managed --compile --install-headers "E:\venv\i
nclude\site\python3.7\cryptography":
running install
C:\Users\dell\AppData\Local\Temp\pip-build-env-gbkenpw6\Lib\site-packages\setuptools\command\install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build an
d pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_py
creating build
creating build\lib.win32-cpython-37
creating build\lib.win32-cpython-37\cryptography
copying src\cryptography\exceptions.py -> build\lib.win32-cpython-37\cryptography
copying src\cryptography\fernet.py -> build\lib.win32-cpython-37\cryptography
copying src\cryptography\utils.py -> build\lib.win32-cpython-37\cryptography
copying src\cryptography_about.py -> build\lib.win32-cpython-37\cryptography
copying src\cryptography_init
.py -> build\lib.win32-cpython-37\cryptography
creating build\lib.win32-cpython-37\cryptography\hazmat
copying src\cryptography\hazmat_oid.py -> build\lib.win32-cpython-37\cryptography\hazmat
copying src\cryptography\hazmat_init.py -> build\lib.win32-cpython-37\cryptography\hazmat
creating build\lib.win32-cpython-37\cryptography\x509
copying src\cryptography\x509\base.py -> build\lib.win32-cpython-37\cryptography\x509
copying src\cryptography\x509\certificate_transparency.py -> build\lib.win32-cpython-37\cryptography\x509
copying src\cryptography\x509\extensions.py -> build\lib.win32-cpython-37\cryptography\x509
copying src\cryptography\x509\general_name.py -> build\lib.win32-cpython-37\cryptography\x509
copying src\cryptography\x509\name.py -> build\lib.win32-cpython-37\cryptography\x509
copying src\cryptography\x509\ocsp.py -> build\lib.win32-cpython-37\cryptography\x509
copying src\cryptography\x509\oid.py -> build\lib.win32-cpython-37\cryptography\x509
copying src\cryptography\x509_init
.py -> build\lib.win32-cpython-37\cryptography\x509
creating build\lib.win32-cpython-37\cryptography\hazmat\backends
copying src\cryptography\hazmat\backends_init.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends
creating build\lib.win32-cpython-37\cryptography\hazmat\bindings
copying src\cryptography\hazmat\bindings_init
.py -> build\lib.win32-cpython-37\cryptography\hazmat\bindings
creating build\lib.win32-cpython-37\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\cmac.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\constant_time.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\hashes.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\hmac.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\keywrap.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\padding.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives\poly1305.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives_asymmetric.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives_cipheralgorithm.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives_serialization.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives
copying src\cryptography\hazmat\primitives_init.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives
creating build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\aead.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\backend.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ciphers.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\cmac.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\decode_asn1.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\dh.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\dsa.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ec.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ed25519.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\ed448.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\encode_asn1.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\hashes.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\hmac.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\poly1305.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\rsa.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\utils.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\x25519.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\x448.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl\x509.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
copying src\cryptography\hazmat\backends\openssl_init
.py -> build\lib.win32-cpython-37\cryptography\hazmat\backends\openssl
creating build\lib.win32-cpython-37\cryptography\hazmat\bindings\openssl
copying src\cryptography\hazmat\bindings\openssl\binding.py -> build\lib.win32-cpython-37\cryptography\hazmat\bindings\openssl
copying src\cryptography\hazmat\bindings\openssl_conditional.py -> build\lib.win32-cpython-37\cryptography\hazmat\bindings\openssl
copying src\cryptography\hazmat\bindings\openssl_init.py -> build\lib.win32-cpython-37\cryptography\hazmat\bindings\openssl
creating build\lib.win32-cpython-37\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\dh.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\dsa.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\ec.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\ed25519.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\ed448.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\padding.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\rsa.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\types.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\utils.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\x25519.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric\x448.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\asymmetric
copying src\cryptography\hazmat\primitives\asymmetric_init
.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\asymmetric
creating build\lib.win32-cpython-37\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\aead.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\algorithms.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\base.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers\modes.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\ciphers
copying src\cryptography\hazmat\primitives\ciphers_init.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\ciphers
creating build\lib.win32-cpython-37\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\concatkdf.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\hkdf.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\kbkdf.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\pbkdf2.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\scrypt.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf\x963kdf.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\kdf
copying src\cryptography\hazmat\primitives\kdf_init
.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\kdf
creating build\lib.win32-cpython-37\cryptography\hazmat\primitives\serialization
copying src\cryptography\hazmat\primitives\serialization\base.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\serialization
copying src\cryptography\hazmat\primitives\serialization\pkcs12.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\serialization
copying src\cryptography\hazmat\primitives\serialization\pkcs7.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\serialization
copying src\cryptography\hazmat\primitives\serialization\ssh.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\serialization
copying src\cryptography\hazmat\primitives\serialization_init.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\serialization
creating build\lib.win32-cpython-37\cryptography\hazmat\primitives\twofactor
copying src\cryptography\hazmat\primitives\twofactor\hotp.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\twofactor
copying src\cryptography\hazmat\primitives\twofactor\totp.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\twofactor
copying src\cryptography\hazmat\primitives\twofactor_init
.py -> build\lib.win32-cpython-37\cryptography\hazmat\primitives\twofactor
running egg_info
writing src\cryptography.egg-info\PKG-INFO
writing dependency_links to src\cryptography.egg-info\dependency_links.txt
writing requirements to src\cryptography.egg-info\requires.txt
writing top-level names to src\cryptography.egg-info\top_level.txt
reading manifest file 'src\cryptography.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs_build'
warning: no previously-included files found matching 'vectors'
warning: no previously-included files matching '' found under directory 'vectors'
warning: no previously-included files matching '
' found under directory '.github'
warning: no previously-included files found matching 'release.py'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching 'codecov.yml'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching 'dev-requirements.txt'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'mypy.ini'
warning: no previously-included files matching '*' found under directory '.circleci'
adding license file 'LICENSE'
adding license file 'LICENSE.APACHE'
adding license file 'LICENSE.BSD'
adding license file 'LICENSE.PSF'
writing manifest file 'src\cryptography.egg-info\SOURCES.txt'
C:\Users\dell\AppData\Local\Temp\pip-build-env-gbkenpw6\Lib\site-packages\setuptools\command\build_py.py:153: SetuptoolsDeprecationWarning: Installing 'cryptography.hazmat.bindin
gs._rust' as data is deprecated, please list it in packages.
!!

    ############################
    # Package would be ignored #
    ############################
    Python recognizes 'cryptography.hazmat.bindings._rust' as an importable package,
    but it is not listed in the `packages` configuration of setuptools.

    'cryptography.hazmat.bindings._rust' has been automatically added to the distribution only
    because it may contain data files, but this behavior is likely to change
    in future versions of setuptools (and therefore is considered deprecated).

    Please make sure that 'cryptography.hazmat.bindings._rust' is included as a package by using
    the `packages` configuration field or the proper discovery methods
    (for example by using `find_namespace_packages(...)`/`find_namespace:`
    instead of `find_packages(...)`/`find:`).

    You can read more about "package discovery" and "data files" on setuptools
    documentation page.


!!

  check.warn(importable)
copying src\cryptography\py.typed -> build\lib.win32-cpython-37\cryptography
creating build\lib.win32-cpython-37\cryptography\hazmat\bindings\_rust
copying src\cryptography\hazmat\bindings\_rust\__init__.pyi -> build\lib.win32-cpython-37\cryptography\hazmat\bindings\_rust
copying src\cryptography\hazmat\bindings\_rust\asn1.pyi -> build\lib.win32-cpython-37\cryptography\hazmat\bindings\_rust
copying src\cryptography\hazmat\bindings\_rust\ocsp.pyi -> build\lib.win32-cpython-37\cryptography\hazmat\bindings\_rust
copying src\cryptography\hazmat\bindings\_rust\x509.pyi -> build\lib.win32-cpython-37\cryptography\hazmat\bindings\_rust
running build_ext
running build_rust
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.

    =============================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/ for specific
       instructions for your platform.
    3) Check our frequently asked questions for more information:
       https://cryptography.io/en/latest/faq/
    4) Ensure you have a recent Rust toolchain installed:
       https://cryptography.io/en/latest/installation/#rust

    Python: 3.7.2
    platform: Windows-10-10.0.19041-SP0
    pip: 22.1.2
    setuptools: 62.4.0
    setuptools_rust: 1.3.0
    =============================DEBUG ASSISTANCE=============================


----------------------------------------

Command ""E:\venv\Scripts\python.exe" -u -c "import setuptools, tokenize;file='C:\Users\dell\AppData\Local\Temp\pip-install-0ddejxjz\crypt
ography\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\dell\AppData
\Local\Temp\pip-record-kooagudn\install-record.txt --single-version-externally-managed --compile --install-headers "E:\venv\include\site\python3.7\cr
yptography"" failed with error code 1 in C:\Users\dell\AppData\Local\Temp\pip-install-0ddejxjz\cryptography
You are using pip version 10.0.1, however version 22.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

我的解答思路和尝试过的方法

网上的基本上都试过了

我想要达到的结果

安装cryptography成功

  • 写回答

0条回答 默认 最新

    报告相同问题?

    问题事件

    • 系统已结题 6月25日
    • 创建了问题 6月17日

    悬赏问题

    • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
    • ¥20 软件测试决策法疑问求解答
    • ¥15 win11 23H2删除推荐的项目,支持注册表等
    • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
    • ¥15 qt6.6.3 基于百度云的语音识别 不会改
    • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
    • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
    • ¥15 lingo18勾选global solver求解使用的算法
    • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
    • ¥20 测距传感器数据手册i2c