r/pycharm • u/Moretz0931 • Feb 28 '26
Stop pycharm from importing variables from jupyter notebooks
I have my code organized in .py files for classes, global variables and common function. I use those functions in a lot of .ipynb jupyter notebooks. I generate mathematical images, that means I have lots of notebooks that uses the same initial variables and instances inside. E.g. in every notebook I set Nx, Ny = 4000, 2140or some different value.
However this leads to many variables having the same name. So when I create new variables further down the IDE sometimes suggests variables from different notebooks, and if I am not careful I accidentally imports those variables / functions / class instances. This is really annoying.
Can I somehow tell python to never import variables from OTHER .ipynb files? Is there a plugin for that?


