我不知道如何修复此错误(对于 Windows 上的 pip install Transformer):\n错误:找不到 Rust 编译器
\nIf 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.\n\nTo update pip, run:\n\n pip install --upgrade pip\n\nand then retry package installation.\n\nIf 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.\n[end of output]\n\nnote: This error originates from a subprocess, and is likely not a problem with pip.\nERROR: Failed building wheel for tokenizers\nFailed to build tokenizers\nERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects\nRun Code Online (Sandbox Code Playgroud)\n也尝试过这个:
\ngit clone https://github.com/huggingface/transformers.git \ncd transformers\npip\xc2\xa0install\xc2\xa0-e\xc2\xa0.\nRun Code Online (Sandbox Code Playgroud)\n当我安装 Rust 时它也不起作用。
\n在安装 Transformer 之前需要先安装 Rust。
标准安装方法(来自Rust 文档)是
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Run Code Online (Sandbox Code Playgroud)
在 Windows 上,您可以使用替代方法:
有时使用安装脚本的默认答案很有用:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12214 次 |
| 最近记录: |