Cargo, the Rust package manager, is not installed or is not on PATH. --windows解决方案

T_thirty 2024-10-26 08:35:02 阅读 89

 今天安装rust时遇到这个问题:

<code> error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.

│ exit code: 1

╰─> [6 lines of output]

Cargo, the Rust package manager, is not installed or is not on PATH.

This package requires Rust and Cargo to compile extensions. Install it through

the system's package manager or via https://rustup.rs/

Checking for Rust toolchain....

[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

error: metadata-generation-failed

× Encountered error while generating package metadata.

╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.

hint: See above for details.

解决方案:https://win.rustup.rs/i686,安装该文件,并按指示操作,(回车即可);

我看站内有位博主分享的一行代码解决,但我的系统无法运行;

<code>curl https://sh.rustup.rs -sSf | sh

后来发现这不适用windows;

 参考文案:rustup.rs - Rust 工具链安装程序



声明

本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。