-
Notifications
You must be signed in to change notification settings - Fork 321
Support loading environment from .envrc with direnv #9965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the suggestion. My guess is that since nobody else has asked for this in notebooks yet, the odds are we won't be pursuing this. However everything here is open source and we gladly except PRs. The tricky part here is that we don't start our kernels using a terminal. So any terminal additions would be difficult to use. .env file support is supported though. Could you use that instead? |
Yeah, Thanks for the quick response. |
@rchiodo |
@NktBkzn - I've resolved by moving variables needed in the python environment to a
It's hacky, but it works... and I think we're a small enough population that microsoft probably won't add this feature. |
@ahgraber Please use this extension: https://github.com/direnv/direnv-vscode |
Jupyter in vscode doesn't run bashrc or zshrc when it starts. Adding |
Environment data
Expected behaviour
If I start an interactive session from a directory with a
.envrc
file that is loaded withdirenv
, the environmental variables that are loaded withdirenv
should be available viaos.environ
.Actual behaviour
None of the variables that are present in my local environment via
direnv
are available.Steps to reproduce:
direnv
is installed, create.envrc
with variables to be loaded and rundirenv allow .
Additional references
There may be some overlap with the vscode-python extension, where they seem to have deemed this feature "not important" even though it is significantly workflow- and expectation- breaking.
Also requested as a feature in microsoft/vscode-python#18220 (comment), and .envrc/direnv proposed as a solution in microsoft/vscode-python#18250 (comment)
The text was updated successfully, but these errors were encountered: