安装transforers时报错:error: can‘t find Rust compiler

报错:

复制代码
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 tokenizers
Failed to build tokenizers
ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects

error: can't find Rust compiler

.......

ERROR: Failed building wheel for tokenizers
Failed to build tokenizers
ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects

方法:

复制代码
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
info: downloading installer

或者
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

然后重新打开终端

最后重新安装transformer

复制代码
pip install transformers==4.15.0

我是第一种有效。

相关推荐
yugi98783820 小时前
MATLAB在卫星姿态控制系统中的应用
开发语言·matlab
历程里程碑20 小时前
C++ 7vector:动态数组的终极指南
java·c语言·开发语言·数据结构·c++·算法
ss27320 小时前
高并发读场景:写时复制容器(Copy-On-Write)
java·开发语言·rpc
czhc114007566320 小时前
c# 1213
开发语言·数据库·c#
一人の梅雨20 小时前
淘宝商品视频接口深度解析:从视频加密解密到多端视频流重构
java·开发语言·python
杼蛘20 小时前
XXL-Job工具使用操作记录
linux·windows·python·jdk·kettle·xxl-job
她说..20 小时前
MySQL数据处理(增删改)
java·开发语言·数据库·mysql·java-ee
BD_Marathon20 小时前
【JavaWeb】ServletContext_域对象相关API
java·开发语言
qq_2290580120 小时前
运行djando项目 配置启动类 label_studio包含前后端启动方法
python·django
invicinble20 小时前
javase-异常体系
开发语言·spring boot