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.

Feature Request: Automatic Environment Activation in Terminal

See original GitHub issue

From @threecgreen on August 4, 2017 15:57

Current behavior

Every time I open the built-in terminal in VSCode, I have to remember to activate the project’s Python environment.

Expected behavior

I’d like $ source activate my_env for conda or $ source bin/activate for virtualenv to run at VSCode terminal startup if I have selected an Python interpreter other than the system default.

Copied from original issue: DonJayamanne/pythonVSCode#1139

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
brettcannoncommented, Jan 17, 2018

I say “yes”. Basically when it comes to conda, we should run through an activated environment when possible.

1reaction
DonJayamannecommented, Dec 9, 2017

From @fourierserious on December 9, 2017 22:10

In User/Workspace Settings, I use

"terminal.integrated.shellArgs.linux": [
    "--rcfile", "/home/jacob/miniconda3/envs/vscode/etc/bash.bashrc"
]

with the following in my bash.bashrc

source /home/jacob/.bashrc
source /home/jacob/miniconda3/bin/activate vscode
Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature to disable conda activation when new terminals are ...
I just started using VS Code to integrate my R and Python scripts in a single workspace. This "feature" of the Python extension...
Read more >
How to create a virtual Python shell - ActiveState
Enter python -m virtualenv venv <project_name>. Note that Venv automatically installs pip into Python 3.4+ virtual environments. Create a ...
Read more >
Manage your environment - Amazon SageMaker
Describes the Amazon SageMaker Studio Lab default environment and how to customize it. ... Open the terminal and activate the studiolab environment.
Read more >
Advanced Visual Studio Code for Python Developers
For example, you can make VS Code activate your virtual environment automatically when you bring up a new terminal window, and you can...
Read more >
Virtual environments for absolute beginners — what is it and ...
3.1 Activating our virtual environment. When we run pip install requests now it will still install them globally, which is not what we...
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