Ehab AlBadawy Ehab AlBadawy - 1 year ago 305
Python Question

How to set env variable in Jupyter notebook

I've a problem that Jupyter can't see env variable in bashrc file, is there a way to load these variables in jupyter or add custome variable to it?

Answer Source

You can setup environment variables in your code as follows:

import sys,os,os.path

This if of course a temporary fix, to get a permanent one, you probably need to setup your ~.profile, more information can be found here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download