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.

1

7 Answers

I had the same issue. Just open the terminal and pip install jupyter

2

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

I re-installed Jupyter Notebook in PyCharm terminal with:

pip install notebook

It solve this problem in Pycharm, I hope it works for you.

Jupyter Notebook docs

3

I had a similar issue when I created my conda environment using the prompt in PyCharm. After some troubleshooting, I found that the best solution was to remove that environment and create a new one using the terminal instead. This solved the problem for me and allowed me to run Jupyter notebooks in PyCharm without any issues.

If you are experiencing the same problem, I recommend trying this solution. To create a new conda environment using the terminal, you can follow the steps outlined in the conda documentation.

I hope this helps you resolve the issue and get back to working with Jupyter notebooks in PyCharm.

Was able to start jupyter via terminal with python3 -m notebook.

Source:

I solved this problem in the following way:

  1. In Pycharm open the interpreter settings. Then in the list of installed packages, I removed all packages that mentioned word "jupyter"
  2. Created a new file ipynb, Pycharm offered to install the jupyter package. Click install - and everything works!

I've utilized a different approach. Navigate to the folder where your .ipynb file is located. Start your Jupyter server, use the command python3 -m notebook, for instance.

ref1

Copy the URL, specifically extracting the section.

Next, open PyCharm, click on Tools, then select Add Jupyter Connection. Choose Connect to Jupyter server using URL and paste your URL.

ref2ref3

You'll be prompted for the password/Token, which corresponds to the second part of the URL following token=.... After this step, your Jupyter server should appear in your folders.

ref4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like