rhap4boy
rhap4boy

Reputation: 41

Environment Variables Visual Studio Code for Mac with Python Jupyter

Where do you set the environment variables for Jupyter in Visual Studio Code for Mac?

Upvotes: 2

Views: 1141

Answers (1)

R Chiodo
R Chiodo

Reputation: 554

There's a number of things you can do (I work on the jupyter extension)

  1. Set environment variables before starting VS code from the command line.
  2. Create a 'runStartupCommands' entry for jupyter. Something like so in your settings.json:
"jupyter.runStartupCommands": ["import os;os.environ['TEST'] = '1'"]
  1. Run that same code in a cell at the start of the notebook.

Upvotes: 2

Related Questions