安装transformers报错error:can‘t find Rust compiler(无需安装Rust)

解决方法在最下面

报错: 

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.
  ----------------------------------------
  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

看了网上一圈要么让你升级pip要么让你安装rust,都试了没用。

解决办法:

直接指定transformer的版本就行

指令:pip install transformers==3.4

你可能感兴趣的:(笔记,rust,后端,python,transformer,pycharm)