当前位置:   article > 正文

ERROR: Could not build wheels for tokenizers which use PEP 517 and cannot be installed directly

error: could not build wheels for tokenizers which use pep 517 and cannot be

安装 transfomers 库的时候报错:

  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. ----------------------------------------
  8. ERROR: Failed building wheel for tokenizers
  9. Failed to build tokenizers
  10. ERROR: Could not build wheels for tokenizers which use PEP 517 and cannot be installed directly

尝试更新 pip 和 setuptools

  1. python -m pip install --upgrade pip
  2. python -m pip install --upgrade setuptools

更新后有新的报错:

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

正常来说应该已经解决了,但是看了好多解决办法可能 python3.9 无法用pip 安装

改用 conda 指令下载:

sudo conda install -n torch_m1 -c huggingface transformer 

因为 conda 默认下载到 base 所以要指定环境名 -n

成功!!!

 

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

闽ICP备14008679号