这是重要的吗?错误:pip的依赖解析器目前没有考虑到所有已安装的包。

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

Is this matter? ERROR: pip's dependency resolver does not currently take into account all the packages that are installed

问题

抱歉,代码部分不需要翻译。以下是翻译好的内容:

然而,它显示:

错误:pip的依赖解析器目前不考虑所有已安装的软件包。这个行为是以下依赖关系冲突的根本原因。
nbconvert 7.4.0 需要 bleach,但未安装。
nbconvert 7.4.0 需要 defusedxml,但未安装。
nbconvert 7.4.0 需要 jupyter-core>=4.7,但未安装。
nbconvert 7.4.0 需要 nbformat>=5.1,但未安装。
nbconvert 7.4.0 需要 packaging,但未安装。
nbconvert 7.4.0 需要 pandocfilters>=1.4.1,但未安装。
nbconvert 7.4.0 需要 pygments>=2.4.1,但未安装。
nbconvert 7.4.0 需要 traitlets>=5.0,但未安装。
已成功安装 MarkupSafe-2.1.2 certifi-2022.12.7 charset-normalizer-2.1.1 filelock-3.9.0 idna-3.4 jinja2-3.1.2 mpmath-1.2.1 networkx-3.0 numpy-1.24.1 pillow-9.3.0 requests-2.28.1 sympy-1.11.1 torch-2.0.1+cu118 torchaudio-2.0.2+cu118 torchvision-0.15.2+cu118 typing-extensions-4.4.0 urllib3-1.26.13

这个重要吗?如果是的话,我该如何修复?
谢谢!

英文:

I have cuda 12 and in a fresh conda environment with python 3.11 I ran pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

However, it shows:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
nbconvert 7.4.0 requires bleach, which is not installed.
nbconvert 7.4.0 requires defusedxml, which is not installed.
nbconvert 7.4.0 requires jupyter-core>=4.7, which is not installed.
nbconvert 7.4.0 requires nbformat>=5.1, which is not installed.
nbconvert 7.4.0 requires packaging, which is not installed.
nbconvert 7.4.0 requires pandocfilters>=1.4.1, which is not installed.
nbconvert 7.4.0 requires pygments>=2.4.1, which is not installed.
nbconvert 7.4.0 requires traitlets>=5.0, which is not installed.
Successfully installed MarkupSafe-2.1.2 certifi-2022.12.7 charset-normalizer-2.1.1 filelock-3.9.0 idna-3.4 jinja2-3.1.2 mpmath-1.2.1 networkx-3.0 numpy-1.24.1 pillow-9.3.0 requests-2.28.1 sympy-1.11.1 torch-2.0.1+cu118 torchaudio-2.0.2+cu118 torchvision-0.15.2+cu118 typing-extensions-4.4.0 urllib3-1.26.13

Is this important? If so, how can I fix that?
Thanks!

答案1

得分: 0

你看到的错误消息与包依赖项不完整有关。解决这个问题很重要,因为在某些情况下,缺少的依赖项可能会导致已安装的包和它们的功能出现问题。

为了解决这个问题,我建议运行以下命令:

pip3 install --upgrade pip

这个命令将升级pip到最新版本,这可能有助于解决任何依赖性问题。之后,您可以尝试再次使用您之前提到的命令安装PyTorch:

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

如果您仍然看到相同的错误消息,您可以尝试使用pip手动安装缺少的依赖项。例如:

pip3 install jupyter-core nbformat traitlets packaging pandocfilters bleach pygments defusedxml

一旦所有包依赖项都已安装,您可以尝试再次安装PyTorch。希望这有所帮助!

英文:

The error message you are seeing is related to incomplete package dependencies. It’s important to address this because, in some cases, missing dependencies can cause issues with the installed packages and their functionality.

To address this issue, I recommend running the following command:

pip3 install --upgrade pip

This command will upgrade pip to the latest version, which may help to resolve any dependency issues. Afterward, you can try installing PyTorch again using the command you mentioned previously:

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

If you still see the same error message, you can try installing the missing dependencies manually using pip. For example:

pip3 install jupyter-core nbformat traitlets packaging pandocfilters bleach pygments defusedxml

Once all the package dependencies have been installed, you can try installing PyTorch again. I hope this helps!

huangapple
  • 本文由 发表于 2023年6月15日 18:08:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/76481423.html
匿名

发表评论

匿名网友

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

确定