简体   繁体   中英

Environment Variables Visual Studio Code for Mac with Python Jupyter

你在 Visual Studio Code for Mac 中在哪里设置 Jupyter 的环境变量?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM