引用 | pip install keybert | ERROR: Could not build wheels for tokenizers which use PEP 517 and cannot be installed directly

window10 安装 keybert 出错以下错误:

  running build_ext
  running build_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 use PEP 517 and cannot be installed directly

参考帖子:https://github.com/UKPLab/sentence-transformers/issues/221

Install Rust link curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Restart the terminal
pip install transformers==2.5.1

1 先安装 rust

2 “sh” 指令无法执行就安装 git,通过 git 执行 sh 命令

3 重新打开 cmd

4 安装 transformer

5 安装 keybert

posted @ 2022-09-28 09:49  谦曰盛  阅读(2868)  评论(0编辑  收藏  举报