错误在使用pip安装Jupyter Notebook时发生。

huangapple go评论96阅读模式
英文:

error while installing jupyter notebook with pip

问题

这是我用pip安装jupyter时遇到的错误:
安装过程中出现错误,提示需要安装或将Rust和Cargo(Rust的包管理器)添加到系统的PATH路径中。您可以通过系统的包管理器或访问https://rustup.rs/来安装它们。

解决这个问题的步骤如下:

  1. 安装Rust和Cargo。
  2. 确保它们已经添加到系统的PATH路径中。
  3. 重新运行pip安装jupyter的命令。

这应该解决您遇到的问题。

英文:

enter image description here

this is the error I am getting while installing jupyter with pip
Preparing metadata (pyproject.toml) ... error
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.
╰─> pywinpty

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

how can I resolve this??

答案1

得分: 1

你的错误截图显示问题不在于 Jupyter,而在于依赖项:pywinpty

根据 pywinpty 的 文档

> 要编译 pywinpty 源代码,必须安装 Rust。可选地,您还可以在包含路径上使用 Winpty 的 C 头文件和库文件。

Rust 是 pywinpty 的一个依赖,而 pywinpty 是你试图安装的 Jupyter 版本的一个依赖。

要么安装 Rust,要么安装不依赖于 pywinpty 的 Jupyter 版本。在不知道你试图安装的 Jupyter 版本/发行版以及安装方式的情况下,没有更多可补充的信息。

英文:

Your error screenshot shows that the issue is not with Jupyter but with dependency: pywinpty

From pywinpty documentation:

> To compile pywinpty sources, you must have Rust installed. Optionally, you can also have Winpty's C header and library files available on your include path.

Rust is a dependency for pywinpty and pywinpty is dependency for the version of the Jupyter youre trying to install.

Either install Rust or install a version Jupyter that does not depend on pywinpty. Not much to add without knowing what version/distribution of Jupyter you are trying to install and how.

huangapple
  • 本文由 发表于 2023年6月12日 22:01:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/76457417.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定