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

我是第一种有效。

相关推荐
功德+n几秒前
Apache POI详解
java·开发语言·maven·apache
m0_7482466116 分钟前
Python大数据可视化:基于大数据技术的共享单车数据分析与辅助管理系统_flask+hadoop+spider
大数据·python·信息可视化
编程梦想记21 分钟前
什么是Flask
后端·python·flask
zybsjn22 分钟前
在 Flask 项目中访问其他页面
后端·python·flask
牵牛老人24 分钟前
C++设计模式-工厂模式:从原理、适用场景、使用方法,常见问题和解决方案深度解析
开发语言·c++·设计模式
即兴小索奇25 分钟前
PyCharm 接入 DeepSeek、OpenAI、Gemini、Mistral等大模型完整版教程(通用)!
ide·python·pycharm
蜗牛骑上天26 分钟前
基于ragflow中deepdoc对pdf文档的rag系统
python·pdf
无难事者若执1 小时前
python LLM工具包
开发语言·python
Wen.py.java1 小时前
Python深度学习零基础入门(二):电影评论情感分析
人工智能·python·深度学习
@Dai1 小时前
【Python】为什么要写__init__.py
android·java·python