Pycharm jupyter notebook wsl: Jupyter package is not installed

前端 未结 3 1461
既然无缘
既然无缘 2020-12-28 08:55

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

相关标签:
3条回答
  • 2020-12-28 09:29

    I had this problem with Datalore plugin enabled on 2020.2 linux, running on bare metal but displaying to a remote X server (probably doesn't matter). My solution was to disable the Datalore plugin (it's enabled for professional pycharm by default).

    This way I was still able to use the "managed" auto-start version with better integration / debugging vs the "configured" option (or at least with less hassle).

    Note since it's been a year, my problem is probably different than OP.

    0 讨论(0)
  • 2020-12-28 09:33

    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.

    0 讨论(0)
  • 2020-12-28 09:44

    The above solution using a designated url with token seems to work with older versions. An simpler solution is to upgrade to the latest PyCharm. I no longer had an issue with the auto managed served using PyCharm 2019.3.2 (Mac)

    0 讨论(0)
提交回复
热议问题