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.

Conda Activate env, integrated terminal doesn't use the correct python

See original GitHub issue

Environment data

  • VS Code version: 1.38.0
  • OS and version: macOS Catalina 10.15
  • Python version (& distribution if applicable, e.g. Anaconda): Anaconda 3
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): Conda env 3.7

Expected behaviour

Setting conda activate env within the integrated terminal should change the python interpreter to that specific env python.

Actual behaviour

The env being used by integrated terminal, is still the default python of osx and not that of the env activated.

Steps to reproduce:

  1. Install vs code 2- Install Anaconda 3- Create a new anaconda env 4- Run vscode 5- Start integrated terminal (no need for creating a project) 6- Do a Conda activate env. (where env is the name of the created env) 7- Do python --version 8- The python will still be the default osx python and not that of the env.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

1reaction
tallaljcommented, Sep 12, 2019

Just wanted to say… As referenced

https://github.com/microsoft/vscode-python/issues/6343#issuecomment-509319313

Turning it to false, fixing the issue in macOS

1reaction
karrtikrcommented, Sep 10, 2019

This issue looks like a dup of https://github.com/microsoft/vscode-python/issues/6343. Quoting the workaround,

As a temporary solution please change the setting terminal.integrated.inheritEnv to false as outlined in https://code.visualstudio.com/updates/v1_36#_launch-terminals-with-clean-environments

We can close this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code terminal doesn't activate Conda environment
First, open the Anaconda prompt (How to access Anaconda command prompt in Windows 10 (64-bit)), and type: conda activate tom. To activate your...
Read more >
Efficient Way to Activate Conda in VSCode - Medium
Option 1: Create New Integrated Terminal (In Active Workspace) · Ctrl+Shift+P and search “Terminal”. · Choose “Terminal: Create New Integrated Terminal (In Active ......
Read more >
Integrated terminal "which python" doesn't point to my conda ...
When I'm in the environment on iterm (Mac), python uses the correct bin associated with the environment but the integrated terminal in ...
Read more >
Manage Python environments and interpreters - Visual Studio ...
Use the Python Environments window to manage global, virtual, and conda environments. Install Python interpreters and packages and assign ...
Read more >
Using Python environments in VS Code
If you create a new conda environment while VS Code is running, use the refresh icon on the top right of the Python:...
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