'ipython version conflict while installing mermaid and ipykernel using pip
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?
Solution 1:[1]
I have to install
nb-mermaidaccording 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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Chris |
