error: can‘t find Rust compiler

这篇具有很好参考价值的文章主要介绍了error: can‘t find Rust compiler。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

操作系统 win11

pip install -r requirements.txt

报错如下

Using cached https://pypi.tuna.tsinghua.edu.cn/packages/56/fc/a3c13ded7b3057680c8ae95a9b6cc83e63657c38e0005c400a5d018a33a7/pyreadline3-3.4.1-py3-none-any.whl (95 kB)
Building wheels for collected packages: safetensors
  Building wheel for safetensors (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for safetensors (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-38
      creating build\lib.win-amd64-cpython-38\safetensors
      copying py_src\safetensors\flax.py -> build\lib.win-amd64-cpython-38\safetensors
      copying py_src\safetensors\numpy.py -> build\lib.win-amd64-cpython-38\safetensors
      copying py_src\safetensors\paddle.py -> build\lib.win-amd64-cpython-38\safetensors
      copying py_src\safetensors\tensorflow.py -> build\lib.win-amd64-cpython-38\safetensors
      copying py_src\safetensors\torch.py -> build\lib.win-amd64-cpython-38\safetensors
      copying py_src\safetensors\__init__.py -> build\lib.win-amd64-cpython-38\safetensors
      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.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for safetensors
Failed to build safetensors
ERROR: Could not build wheels for safetensors, which is required to install pyproject.toml-based projects

解决方法:

去官网下载安装rustup.rs - The Rust toolchain installer

error: can‘t find Rust compiler,rust,开发语言,后端

下载完rustup-init.exe,运行安装,会出现窗口提示需要预先安装vs,按默认安装即可。等一会vs安装成功。

需要再次手动运行rustup-init.exe,这次就是正式安装了, 都按模型走即可。全部结束就安装成功了。

再去执行pip安装即可。文章来源地址https://www.toymoban.com/news/detail-678952.html

到了这里,关于error: can‘t find Rust compiler的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Maven Compile时报错 [ERROR] [X Group Enforcer Rules] find DuplicateClasses

    类冲突 [ERROR] [Ctrip Group Enforcer Rules] find DuplicateClasses Found in: net.jpountz.lz4:lz4:jar:1.3.0:compile org.lz4:lz4-java:jar:1.7.1:compile Duplicate classes: net/jpountz/xxhash/AbstractStreamingXXHash32Java.class net/jpountz/lz4/LZ4BlockInputStream.class net/jpountz/xxhash/XXHash32JNI.class 这种情况是因为相同类被不同jar包引用,用

    2024年02月07日
    浏览(24)
  • 【rust语言】rust多态实现方式

    学习rust当中遇到了这个问题,记录一下,不对地方望指正 多态是面向对象程序设计中的一个重要概念,指同一个行为或操作在不同实例上具有不同的行为或结果。简单来说,多态就是指同一种类型的对象,在不同的上下文中有不同的行为。多态性使得程序可以更加灵活、可

    2024年02月11日
    浏览(35)
  • C语言和Rust语言的互相调用(2)(Rust调用C)

    1.创建项目 rust调用c方式挺多的,这里采用最通俗易懂的方法,用构建脚本进行构建整个项目。 2.编辑build.rs的内容 这里的build.rs:若要创建构建脚本,我们只需在项目的根目录下添加一个 build.rs 文件即可。这样一来, Cargo 就会先编译和执行该构建脚本,然后再去构建整个项

    2024年02月02日
    浏览(41)
  • 【Rust 基础篇】Rust FFI:连接Rust与其他编程语言的桥梁

    Rust是一种以安全性和高效性著称的系统级编程语言,具有出色的性能和内存安全特性。然而,在现实世界中,我们很少有项目是完全用一种编程语言编写的。通常,我们需要在项目中使用多种编程语言,特别是在与现有代码库或底层系统交互时。为了实现跨语言的互操作性,

    2024年02月15日
    浏览(38)
  • Rust 笔记:Rust 语言中的常量与变量

    Rust 笔记 Rust 语言中的常量与变量 作者 : 李俊才 (jcLee95):https://blog.csdn.net/qq_28550263?spm=1001.2101.3001.5343 邮箱 : 291148484@163.com 本文地址 :https://blog.csdn.net/qq_28550263/article/details/130875912 【介绍】:本文介绍 Rust 语言中的常量与变量。 上一节:《 上一节标题 》 | 下一节:《

    2024年02月06日
    浏览(49)
  • Rust 笔记:Rust 语言中的字符串

    Rust 笔记 Rust 语言中的字符串 作者 : 李俊才 (jcLee95):https://blog.csdn.net/qq_28550263?spm=1001.2101.3001.5343 邮箱 : 291148484@163.com 本文地址 :https://blog.csdn.net/qq_28550263/article/details/130876665 【介绍】:本文介绍 Rust 语言中的字符和字符串的用法。 上一节:《 Rust 语言中使用 vector(向

    2024年02月06日
    浏览(42)
  • SpringBoot——单元测试error: can not execute. because can not find cache of TableInfo for entity!

      单元测试时,遇到以下报错: 在测试类中,添加mybatis的初始化构建

    2024年02月12日
    浏览(40)
  • Error: Can‘t find Python executable “python“, you can set the PYTHON env variable.解决办法

    😦电脑磕坏了    最近把公司给的mac屏幕给磕坏了,换成自己的macbookpro,本来想用时间机器做个无缝衔接,结果发现不能用了,跟客服沟通被告知macos版本在11以上不支持时间机器系统迁移,只能使用迁移助理做数据备份,非常痛苦!!!要重新安装各种环境,各种软件!!

    2023年04月08日
    浏览(28)
  • 【Rust】Rust学习 第十三章Rust 中的函数式语言功能:迭代器与闭包

    Rust 的设计灵感来源于很多现存的语言和技术。其中一个显著的影响就是  函数式编程 ( functional programming )。函数式编程风格通常包含将函数作为参数值或其他函数的返回值、将函数赋值给变量以供之后执行等等。 更具体的,我们将要涉及: 闭包 ( Closures ),一个可以储

    2024年02月12日
    浏览(39)
  • Rust编程语言入门之Rust的面向对象编程特性

    Rust 受到多种编程范式的影响,包括面向对象 面向对象通常包含以下特性:命名对象、封装、继承 “设计模式四人帮”在《设计模型》中给面向对象的定义: 面向对象的程序由对象组成 对象包装了数据和操作这些数据的过程,这些过程通常被称作方法或操作 基于此定义:

    2023年04月21日
    浏览(38)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包