Pycharm fails to start Jupyter server after attempts to install the (already installed) "notebook" package
I started having this problem after upgrading Pycharm to version 2024.3.1 (Professional Edition) (Build #PY-243.22562.180, built on December 11, 2024). Before that my repository was working just fine but I can't really be sure if the issue is due to the update. The problem, as the title suggests, is that I am unable to (consistently) run a jupyter notebook. I am using poetry as my package manager and MacOS Sequoia 15.2 .
So one day I just open a notebook, try to run a cell and I get the message “The ‘notebook’ package is being installed. It may take some time.” But before that day, I never had to install such notebook package. Even worse, after the package is installed, the jupyter server tries to start for about 10 minutes but it never does. This results in the cell run crashing without displaying any result (see images below after even adding notebook to my pyproject.toml file and running poetry update).



What I have tried:
1. Closing and opening Pycharm again
Effect: The problem persisted
2. Reinstalling Pycharm
Effect: The problem persisted
3. Deleting the repo and cloning it again
Effect: The problem persisted
4. Deleting the pyproject.toml and poetry.lock files, copy the same version of these files to the project folder, and running poetry update
Effect: The problem persisted
5. Deleting the poetry environment (but keeping the pyproject.toml and poetry.lock files), creating a new poetry environment, and running poetry update
Effect: The problem persisted
6. Deleting the poetry environment, together with the pyproject.toml and poetry.lock files, and creating a new poetry environment.
Effect: Interestingly, with a brand new environment, the same message for installing the notebook package appears but the server actually starts this time and runs the cell. At this point, I can turn off the jupyter server or close Pycharm and, after opening it again, jupyter runs as expected (except for the message again). I then proceed to the content of my pyproject.toml file into the newly created pyproject.toml file, and run poetry update. If the jupyter server was on then, everything keeps working as normal (the newly added packages to the pyproject.toml file are even recognized). However, after restarting the jupyter server, I am back to square one (message about notebook package and cell crashing)
7. Run the notebook on VsCode with the same poetry environment
Effect: VsCode runs the notebook without a problem, so it has to be Pycharm
8. Run Python scripts
Effect: Works flawlessly!
9. Run jupyter notebook on Pycharm on a different project with a different poetry environment
Effect: Works flawlessly!
Can you please shed some light into this issue?
请先登录再写评论。
I have experienced the same thing.
Same for me.
PyCharm 2024.3.1.1 (Professional Edition)
Build #PY-243.22562.220, built on December 18, 2024
Runtime version: 21.0.5+8-b631.28 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 11.0
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 16
Registry:
debugger.new.tool.window.layout=true
ide.experimental.ui=true
i18n.locale=
python.debug.asyncio.repl=false
Non-Bundled Plugins:
com.jetbrains.space (243.21565.122)
org.jetbrains.plugins.go-template (243.21565.122)
com.intellij.plugins.vscodekeymap (243.21565.122)
com.wakatime.intellij.plugin (15.0.3)
com.intellij.kubernetes (243.22562.112)
com.intellij.ml.llm (243.22562.251.6)
com.koxudaxi.ruff (0.0.42)
mobi.hsz.idea.gitignore (4.5.4)
com.github.copilot (1.5.30-242)
Same here, the theoretically launched Jupyter server is not accessible, nothing runs, cells are queued forever.
PyCharm 2024.3 (Professional Edition)
Build #PY-243.21565.199, built on November 13, 2024
Runtime version: 21.0.5+8-b631.16 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 11.0
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4080M
Cores: 16
Registry:
ide.experimental.ui=true
i18n.locale=
Non-Bundled Plugins:
ru.adelf.idea.dotenv (2024.3)
org.jetbrains.plugins.github (243.21565.204-ultimate)
Same here.
PyCharm 2024.3.1.1 (Professional Edition)
Build #PY-243.22562.220, built on December 18, 2024
Licensed to Matheus C.
You have a perpetual fallback license for this version.
Subscription is active until January 12, 2026.
Runtime version: 21.0.5+8-b631.28 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 6.11.0-13-generic
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 24
Registry:
ide.experimental.ui=true
i18n.locale=
Non-Bundled Plugins:
Rider UI Theme Pack (0.15.2)
Current Desktop: ubuntu:GNOME
Same here, I can't use the integrated notebook support anymore. If I run the Jupyter server manually with
poetry run jupyter notebook --no-browser
and configure PyCharm to connect to it, everything works as expected.
PyCharm 2024.3.1.1 (Professional Edition)
Build #PY-243.22562.220, built on December 18, 2024
Runtime version: 21.0.5+8-b631.28 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 5.15.0-130-generic
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 16384M
Cores: 8
Registry:
ide.experimental.ui=true
i18n.locale=
Non-Bundled Plugins:
me.lensvol.blackconnect (0.6.2)
com.intellij.ml.llm (243.22562.251.6)
com.koxudaxi.ruff (0.0.42)
net.ashald.envfile (3.4.2)
com.intellij.bigdatatools.core (243.22562.218)
com.intellij.bigdatatools.binary.files (243.21565.129)
com.intellij.bigdatatools.rfs (243.22562.218)
com.github.jk1.ytplugin (2024.2.123)
Current Desktop: X-Cinnamon
hey, here is what worked for me:
delete the `.idea` folder, as to make a “fresh pycharm project” for this repository,
I think that what happened for me is that I have checked in the “.idea” folder on one computer, that has conda environment “A”, then cloned the repo on another, which has conda environment “B”, and pycharm is quitely erring out on trying to call the python interpreter from environment “A” which is not there.
the way to discover this is to look at what python interpreter is configured for the project you have just opened, for me it showed “<null> non-zero exit code”
Having said that, it's a bit poor that such an error is silenced rather than shown in some pop-up baloon along with the “notebook is being installed…”