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.

Activating a conda environment using `conda` instead of `source`

See original GitHub issue

Environment data

  • VS Code version: 1.23.1
  • Extension version (available under the Extensions sidebar): 2018.5.0
  • OS and version: Linux Manjaro 4.16.13-1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.3 / conda version: 4.5.2
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda

Actual behavior

I am using the zsh shell. When I create a new python terminal it uses source activate 'name_of_environment'

Expected behavior

I am using the zsh shell. When I create a new python terminal it uses conda activate 'name_of_environment

Steps to reproduce:

  1. install latest conda
  2. add “. /etc/profile.d/conda.sh” to your .zshrc file as recommended by any conda version after 4.4
  3. try to create a new python terminal within vscode whille the activateEnviroment setting is true

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:36 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
ericsnowcurrentlycommented, Oct 1, 2018

BTW, I tried out miniconda 4.4.0+ on Windows and it worked fine. So we don’t need to change anything there.

1reaction
DonJayamannecommented, Aug 14, 2018

@d3r3kk

I’d close #2315 and keep this open, as this has the original issue and the solution. (I.e. mentioned the new way of activation). #2315 merely mentioned another symptom.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Managing environments - Conda
With conda, you can create, export, list, remove, and update environments that have different versions of Python and/or packages installed in them.
Read more >
How to activate an Anaconda environment - python
The recommended way of activating an environment is now conda activate myenv instead of source activate myenv . To enable the new syntax, ......
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 >
I Finally Managed to Activate a Conda Environment in My CI ...
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. To initialize your shell, run $ conda init < ...
Read more >
When using conda, "source activate [env_name]" doesn't work ...
The problem may be because the Anaconda directory is not part of your PATH. You can check this by entering the following command...
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