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

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

问题描述

今天在配置一个关键时需要执行pip install logru,在执行过程中出现了以下错误:

  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run su***essfully.
  │ 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 ***pile 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.

经查询,找到了这个错误的解决方案。

解决方案

python">curl https://sh.rustup.rs -sSf | sh

执行完之后关闭终端再重新打开,重新执行pip install logru后没有再出错。

参考链接

Cargo, the Rust package manager, is not installed or is not on PATH. · Issue #192 · ijl/orjson · GitHub

https://doc.rust-lang.org/cargo/getting-started/installation.html

转载请说明出处内容投诉
CSS教程_站长资源网 » Cargo, the Rust package manager, is not installed or is not on PATH. 解决方案

发表评论

欢迎 访客 发表评论

一个令你着迷的主题!

查看演示 官网购买