我不知道如何修复此错误(对于 Windows 上的 pip install Transformer): 错误:找不到 Rust 编译器
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.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
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
也尝试过这个:
git clone https://github.com/huggingface/transformers.git
cd transformers
pip install -e .
当我安装 Rust 时它也不起作用。
我也遇到了按照上述建议安装 rustup 后仍然存在的问题。使用[使用拥抱变压器进行情感分析][1]我发现以下 pip 命令来安装变压器:
pip install transformers==4.6.1
设置变压器版本以安装相关安装,它已完成,没有任何进一步的问题。 我希望这可以帮助其他人节省安装时间...... [1]:https://python.plainenglish.io/sentiment-analysis-in-python-with-3-lines-of-code-9382a649c23d