Skip to content

Support for .envrc / direnv #14250

@tbenst

Description

@tbenst

VScode 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions