Jupyter notebook not working when 'inheriting global packages' ticked on

Answered

Hi everyone,

I installed the premium (student) version of Pycharm yesterday to be able to use Jupyter notebooks combined with an IDE.It is the first time that I have used Pycharm so it is difficult for me to see what I am doing wrong.

When I create a new project and tick the box 'inherit global packages' I cannot run the cells in a jupyter notebook file.

I can input code and it displays it in the 'preview' section but I cannot run the cells. Jupyter notebook is installed properly since I can call it from the command line (even from within my virtualenv - see screenshots). When I open the notebook in my browser I am able to run the cells I had written in Pycharm. This seems to suggest that the problem lies within Pycharm itself.

When I create a new project without inheriting the global packages the notebook works fine after installing Jupyter. However, I do not want to install all my packages manually before every project since this is not the reason that I moved to Pycharm and it is not very efficient. Is there a way to get rid of the pop-up error message and get the notebooks to work properly?

I have read a lot of forums but the suggestions didn't solve my problems. I hope you can help me out.

Kind regards,
Emile

4 comments
Comment actions Permalink

Hi,

Unfortunately, that's a known bug https://youtrack.jetbrains.com/issue/PY-37180, please upvote and feel free to add comments.

1
Comment actions Permalink

Hi,

I see, I didn't see the other issues and i hadn't found the same question on this support page.
Is there a way to automatically install the packages I want when starting a new project or is this something that needs to be done manually?

Thank you for the url with the other issue post.
Kind regards

0
Comment actions Permalink

At the moment, it's not possible.
We have plans to allow specifying requirements.txt and other files during the project creation, but there is no ETA yet.

As a workaround, you can install all the packages you need into one venv and then use that venv during project creation (use Existing interpreter option).

1
Comment actions Permalink

Ahh yes, should've thought about that as well! I will give it a go. Thank you very much for your quick responses, I really appreciate the support team!

0

Please sign in to leave a comment.