Support for .envrc / direnv
See original GitHub issueVScode has great out-of-the-box suport for .envrc
files: opening a terminal will automatically load the .envrc
for example. Because of this behavior, many VSCode extensions also run in the .envrc environment, like the Julia plugin. Unfortunately, vscode-python is the exception.
Loading .envrc files is critical when using systems that do not have a python interpreter available on the path by default. In my case, I encounter this on Sherlock, Stanford’s HPC, where I need to load modules before starting a Jupyter kernel. This is also problematic on NixOS and other sandoxed OSes, which may need a line or two of setup to bring dependencies into the current environment.
It would be great if VScode-python could first setup the environment using .envrc
before launching the ipykernel. This is consistent with VScode’s default behavior, and will enable HPC users to use Python Interactive on the cluster itself.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top GitHub Comments
Thank you for the suggestion! We have marked this issue as “needs decision” to make sure we have a conversation about your idea. We plan to leave this feature request open for at least a month to see how many 👍 votes the opening comment gets to help us make our decision.
@luabud few other users with same issue: https://www.reddit.com/r/vscode/comments/g7joeg/setting_up_a_remote_ssh_python_developing_setup/ https://stackoverflow.com/questions/65190772/vscode-remote-development-server-prerequisites-on-hpc-server-managed-via-environ
More information on environment modules, that I and the users on the two link above mention: http://modules.sourceforge.net/