安装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

我是第一种有效。

相关推荐

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

    2024-04-03 08:04:01       15 阅读
  2. Ubuntu 安装transformerserror can‘t find rust compiler

    2024-04-03 08:04:01       38 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-03 08:04:01       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-03 08:04:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-03 08:04:01       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-03 08:04:01       20 阅读

热门阅读

  1. HTML如何设置字体样式?

    2024-04-03 08:04:01       11 阅读
  2. 进程和线程之间的区别和联系

    2024-04-03 08:04:01       15 阅读
  3. 串口屏接口之RS232/485的理解

    2024-04-03 08:04:01       13 阅读
  4. 国外服务器租用需要考虑哪些重要信息

    2024-04-03 08:04:01       16 阅读
  5. OCRmyPDF:全能PDF光学字符识别工具及其Python集成

    2024-04-03 08:04:01       9 阅读
  6. Docker in Docker原理与实战

    2024-04-03 08:04:01       10 阅读
  7. 第四章:Minikube生命周期管理命令

    2024-04-03 08:04:01       11 阅读
  8. springboot + mybatis支持多数据库

    2024-04-03 08:04:01       14 阅读
  9. 【Python进阶(五)】——模块搜索及工作目录

    2024-04-03 08:04:01       12 阅读
  10. Quill文档(四):使用Parchment克隆Medium

    2024-04-03 08:04:01       11 阅读