I am trying to set & reach variables in jupyter notebooks.
I tried using os.setenviron but that only seem to work when I define those, when I restart notebook or use another notebook they are gone. Then I find this answer which suggest to add them to the kernel:
{
"display_name": "Python 3 with environment",
"language": "python",
"argv": [
"/usr/bin/python2",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"env": {"test":"test"}
}
My question is then how do I reach that test variable inside juypter notebook? I tried env.test, test but both do not work.
Or maybe I am not using os.environ properly so that my variable would be written 1 time and then used x times between multiple jupyter notebooks?