使用PIP安装美人鱼和ipykernel时的IPython版本冲突

发布于 2025-01-21 02:42:12 字数 2480 浏览 2 评论 0 原文

为了在ipython笔记本中使用美人鱼,我必须根据 nb-Mermaid “ =“ nofollow noreferrer”> this 。不幸的是,它卸载了已安装的 ipython 软件包的先前版本,该版本实际上具有较新的版本。

Installing collected packages: IPython, nb-mermaid
  Attempting uninstall: IPython
    Found existing installation: ipython 8.2.0
    Uninstalling ipython-8.2.0:
      Successfully uninstalled ipython-8.2.0
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.
ipykernel 6.11.0 requires ipython>=7.23.1, but you have ipython 3.2.3 which is incompatible.
Successfully installed IPython-3.2.3 nb-mermaid-0.1.0

它降级 ipython-8.2.0 ipython-3.2.3 。实际上,关于 this

然后,为了解决问题,我尝试升级 ipython 软件包。

Installing collected packages: ipython
  Attempting uninstall: ipython
    Found existing installation: ipython 3.2.3
    Uninstalling ipython-3.2.3:
      Successfully uninstalled ipython-3.2.3
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.
nb-mermaid 0.1.0 requires IPython<4.0,>3.0, but you have ipython 8.2.0 which is incompatible.
Successfully installed ipython-8.2.0

nb-Mermaid 的依赖性也出现了另一个问题。作为摘要

软件包 日期 依赖 版本
nb-Mermaid-0.1.0 2015年7月28日 ipython &lt; 4.0 ,,<代码>&gt; 3.0
ipykernel-6.11.0 2022年3月31日 代码>

表明,没有任何重叠版本可以同时安装 nb-Mermaid-0.1.0 ipykernel-6.11.1.0

是否有解决这个问题的解决方法?

In order to use Mermaid in a IPython Notebook I have to install nb-mermaid according to this. Unfortunately, it uninstall the previous version of installed ipython package, which has actually newer version.

Installing collected packages: IPython, nb-mermaid
  Attempting uninstall: IPython
    Found existing installation: ipython 8.2.0
    Uninstalling ipython-8.2.0:
      Successfully uninstalled ipython-8.2.0
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.
ipykernel 6.11.0 requires ipython>=7.23.1, but you have ipython 3.2.3 which is incompatible.
Successfully installed IPython-3.2.3 nb-mermaid-0.1.0

It downgrades ipython-8.2.0 to ipython-3.2.3. And actually there is still an open issue about this.

Then to resolve the problem I try to upgrade the ipython package.

Installing collected packages: ipython
  Attempting uninstall: ipython
    Found existing installation: ipython 3.2.3
    Uninstalling ipython-3.2.3:
      Successfully uninstalled ipython-3.2.3
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.
nb-mermaid 0.1.0 requires IPython<4.0,>3.0, but you have ipython 8.2.0 which is incompatible.
Successfully installed ipython-8.2.0

And another problem comes up for dependency of nb-mermaid. As summary

Package Date Dependency Version
nb-mermaid-0.1.0 28 Jul 2015 ipython <4.0, >3.0
ipykernel-6.11.0 31 Mar 2022 ipython >=7.23.1

which shows that there is not any overlap version available to install both nb-mermaid-0.1.0 and ipykernel-6.11.0.

Is there any workaround to solve this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

顾忌 2025-01-28 02:42:12

我必须根据安装nb-mermaid这个

难怪 该项目 包含一些非常旧的依赖项:尚未触及近6年,已被作者抛弃。就我个人而言,我会完全避免使用它。

不幸的是,我在快速搜索中没有看到任何好的现代替代品。

如果您确实想使用它,我建议您使用 master 分支的最新提交,其中 IPython<4.0 约束已删除

pip install git+https://github.com/bollwyvl/nb-mermaid.git@103502e6

I have to install nb-mermaid according to this

It's no wonder that that project includes some very old dependencies: it hasn't been touched in nearly 6 years and has been abandoned by the author. Personally, I'd avoid using it at all.

Unfortunately, I don't see any good modern alternatives on a quick search.

If you really want to use it, I suggest you use the latest commit from the master branch where the <4.0 constraint on IPython was removed:

pip install git+https://github.com/bollwyvl/nb-mermaid.git@103502e6
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文