All,
I know of the way you can add an environment variable to a kernel.json
by adding something like:
"env": {
"CARTOPY_DATA_DIR":"/path/to/shapefiles"
},
but I was wondering is there a jupyter kernelspec
command one can use to do this “programmatically”? That is, say I create my kernelspec with python3 -m ipykernel install
as usual and then can I do, say, jupyter kernelspec add-env
or some sort of thing?
I’m just trying to make it “easy” for me to always add, say, a CARTOPY_DATA_DIR
to any kernel I make.