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.

python extension that recommends terminal.integrated.inheritEnv: false causes Terminal to fail on Linux

See original GitHub issue

Environment data

  • VS Code version: 1.50.1
  • Extension version (available under the Extensions sidebar): 2020.9.114305
  • OS and version: Ubuntu 20.04
  • Python version (& distribution if applicable, e.g. Anaconda): conda python 3.8
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: N/A
  • Value of the python.languageServer setting: Pylance

Expected behaviour

Terminal works

Actual behaviour

Terminal doesn’t work

Steps to reproduce:

See https://github.com/microsoft/vscode/issues/76542 and comment https://github.com/microsoft/vscode/issues/76542#issuecomment-619703916

The prompt image

causes this setting to be injected, and then Terminal stops working on Ubuntu. It takes a lot of google searching to find out that this is the root cause.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
karthiknadigcommented, Oct 21, 2020

If terminal.integrated.inheritEnv: false is causing issues, I recommend turn it back on. But do these steps to have a better experience with conda in general.

  1. Turn off auto activation. To do this, disable these two settings, ideally only for the project you are working on: image
  2. Exit VS Code.
  3. Open Anaconda Prompt, navigate to your project.
  4. Activate the environment that you want.
  5. Run code . or code project.code-workspace to launch VS Code.

This will give you an activated environment, and the extension will not have to try and activate every time a terminal is created.

0reactions
karrtikrcommented, Dec 15, 2022

According to https://github.com/microsoft/vscode/issues/76542 this should no longer be an issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to have conda commands match behaviour in Vscode's ...
My recommendation would be to simply set VS Code to use the shell you are using normally: How to change the integrated terminal...
Read more >
Integrated Terminal in Visual Studio Code
Visual Studio Code has an integrated terminal to enable working in your shell of choice without leaving the editor.
Read more >
Troubleshooting - CSE 160 - Washington
Add in this line between the curly braces "terminal.integrated.inheritEnv": false being sure that you add a comma to the end of the preceding...
Read more >
Vs code env variables - viviamaviaggia.it
If you are experiencing issues with this environment in the integrated terminal, we recommend that you let the Python extension change "terminal.
Read more >
Setting Up Visual Studio Code - Practical Data Science
Type Shell Command: Install code command in PATH and open that. Wait for confirmation. Set terminal.integrated.inheritEnv to False in VS Code¶. In order...
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