question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for .envrc / direnv

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
karthiknadigcommented, Oct 5, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

direnv – unclutter your .profile | direnv
direnv is not loading the .envrc into the current shell. It's creating a new bash sub-process to load the stdlib, direnvrc and .envrc...
Read more >
Add support for .env files · Issue #284 · direnv ... - GitHub
I am currently using a tool that only supports the standard .env format (var=value), ... ln -s .env .envrc direnv: error .envrc is...
Read more >
A guide to manage your environment variables in a better way ...
Supports a variety of shells, the list comprises of bash ... To start using direnv , you just need an .envrc file in...
Read more >
5 Ways to Manage Environment Variables with direnv
envrc file (or optionally .env ), and those variables will be set when you enter that directory — or one of its children...
Read more >
direnv - Visual Studio Marketplace
This extension adds direnv support to Visual Studio Code by loading ... Only allow .envrc files from sources you trust since direnv executes ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found