Search code examples
pythonintellij-ideapycharmjupyterjetbrains-ide

Jupyter Notebook does not run in PyCharm


When I try to run the server when I'm using PyCharm brings me this error

enter image description here

Jupyter server process exited with code 1
usage: jupyter.py [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] [--paths] [--json] [--debug] [subcommand]

Jupyter: Interactive Computing

positional arguments: subcommand the subcommand to launch

optional arguments:
-h, --help show this help message and exit
--version show the versions of core jupyter packages and exit
--config-dir show Jupyter config dir
--data-dir show Jupyter data dir
--runtime-dir show Jupyter runtime dir
--paths show all Jupyter paths. Add --json for machine-readable format.
--json output paths as machine-readable json
--debug output debug information about paths

Available subcommands: 1.0.0

Jupyter command jupyter-notebook not found.

When running Jupyter using VSCode it works properly.

I also tried reinstalling it from PyCharm packages and terminal but still doesn't work.


Solution

  • I didn't manage to solve this, but I found a workaround

    1. Go to PyCharm Settings and search for Jupyter Servers

    2. Open a Terminal, and start Jupyter notebook, typically: python3 -m notebook

    3. Copy the URL with the token to the Configured Server field in Pycharm, click OK

    You should now be able to run and debug Jupyter cells in Pycharm!

    enter image description here

    enter image description here