Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pycharm jupyter notebook wsl: Jupyter package is not installed

Tags:

I would like to use Jupyter notebook inside Pycharm. The project interpreter is a python2.7 from a virtual environment inside WSL (ubuntu 18.04).

The Jupiter package is correctly installed inside the virtual environment (I can run it by jupyter notebook).

My problem is that when I want to use Jupyter notebook inside Pycharm, I get the following error: Run Error Jupyter package is not installed (see picture).

enter image description here

Any idea what's going on here?

like image 256
Fariborz Ghavamian Avatar asked Mar 22 '19 15:03

Fariborz Ghavamian


People also ask

Can I install Jupyter Notebook with PyCharm?

With Jupyter Notebook integration available in PyCharm , you can easily edit, execute, and debug notebook source code and examine execution outputs including stream data, images, and other media.

Is Jupyter Notebook and PyCharm same?

PyCharm feature comparison. Jupyter Notebook and PyCharm have distinct features, which makes each tool better for specific applications. For instance, Jupyter's features are more suited to data analysts and research applications, whereas PyCharm's features are designed for developers and software engineering.


1 Answers

I had this problem in Python 3. Below are the steps I took to resolve the issue; I believe they should resolve the issue for you too:

  1. I had Jupyter Lab installed. Pycharm only works with Jupyter Notebook. Long story short, if you have Jupyter Lab installed you need to uninstall all your packages using:

    $ pip freeze | xargs pip uninstall -y

  2. Restart your computer

  3. Follow Jupyter Notebook installation instructions

  4. Make sure WSL is set up through pycharm instructions: wsl pycharm instructions

  5. In Pycharm, open an .ipynb file. Click the dropdown that says "Managed Jupyter server" It's right above the text editor. Select "configure Jupyter server". Check configured server.

  6. In your wsl terminal, type jupyter notebook. Copy and paste the text that looks like: http://localhost:8888/?token=874asdf687asd6fasd8f74ds6f4s9d8f7sddf into the cofigured server box in Pycharm.

That's it. You should be able to run the jupyter cells in pycharm now.

like image 59
Keith Lyons Avatar answered Oct 10 '22 18:10

Keith Lyons