当前位置: 首页 > news >正文

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: safetensorsBuilding wheel for safetensors (pyproject.toml) ... errorerror: subprocess-exited-with-error× Building wheel for safetensors (pyproject.toml) did not run successfully.│ exit code: 1╰─> [25 lines of output]running bdist_wheelrunning buildrunning build_pycreating buildcreating build\lib.win-amd64-cpython-38creating build\lib.win-amd64-cpython-38\safetensorscopying py_src\safetensors\flax.py -> build\lib.win-amd64-cpython-38\safetensorscopying py_src\safetensors\numpy.py -> build\lib.win-amd64-cpython-38\safetensorscopying py_src\safetensors\paddle.py -> build\lib.win-amd64-cpython-38\safetensorscopying py_src\safetensors\tensorflow.py -> build\lib.win-amd64-cpython-38\safetensorscopying py_src\safetensors\torch.py -> build\lib.win-amd64-cpython-38\safetensorscopying py_src\safetensors\__init__.py -> build\lib.win-amd64-cpython-38\safetensorsrunning build_extrunning build_rusterror: can't find Rust compilerIf 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 pipand 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

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

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

再去执行pip安装即可。

http://www.lryc.cn/news/143116.html

相关文章:

  • 全面解析MES系统中的车间退料管理
  • 探究finally代码块是否执行
  • leetcode刷题(字符串相加、包含每个查询的最小区间、模拟行走机器人、环形子数组的最大和、满足不等式的最大值、四数之和、树中距离之和)
  • Grafana reporter定时报表踩坑记录
  • Flutter 状态管理引子
  • CFC编程入门_【10分钟学会】
  • golang无需创建新切片
  • Django基础5——ORM中间程序
  • SpringAOP详解(上)
  • C++ 存储类
  • 【教程分享】Docker搭建Zipkin,实现数据持久化到MySQL、ES
  • 数据库——MySQL高性能优化规范
  • openapi中job提交
  • Spring Boot 整合 分布式搜索引擎 Elastic Search 实现 数据聚合
  • 深入探讨代理技术:保障网络安全与爬虫效率
  • 【云原生】Docker私有仓库 RegistryHabor
  • 二叉树先序遍历的两种思路
  • 小研究 - JVM 逃逸技术与 JRE 漏洞挖掘研究(一)
  • 好用的可视化大屏适配方案
  • 言有三新书出版,《深度学习之图像识别(全彩版)》上市发行,配套超详细的原理讲解与丰富的实战案例!...
  • 英特尔开始加码封装领域 | 百能云芯
  • 基于大数据+django+mysql的学习资源推送系统的设计与实现(含报告+源码+指导)
  • CCF HPC China2023 | 盛大开幕,邀您关注澎峰科技
  • 【git进阶使用】 告别只会git clone 学会版本控制 ignore筛选 merge冲突等进阶操作
  • 【【萌新的STM32学习-16中断的基本介绍1】】
  • ctfshow-红包题第二弹
  • C# winform中无标题栏窗口如何实现鼠标拖动?
  • 【操作系统】各平台定时器粒度
  • 抽象又有点垃圾的JavaScript
  • 【Spring Boot】使用Spring Boot进行transformer的部署与开发