当前位置:   article > 正文

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

can't find rust compiler

报错:

  1. error: can't find Rust compiler
  2. 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.
  3. To update pip, run:
  4. pip install --upgrade pip
  5. and then retry package installation.
  6. 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.
  7. [end of output]
  8. note: This error originates from a subprocess, and is likely not a problem with pip.
  9. ERROR: Failed building wheel for tokenizers
  10. Failed to build tokenizers
  11. 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

方法:

  1. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
  2. info: downloading installer
  3. 或者
  4. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

然后重新打开终端

最后重新安装transformer

pip install transformers==4.15.0

我是第一种有效。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/酷酷是懒虫/article/detail/946908
推荐阅读
相关标签
  

闽ICP备14008679号