python-shell
python-shell copied to clipboard
How to activate conda environment and run python.
How do I activate the conda environment and run python?
use pythonPath
option to set it to the python binary in conda environment.
For me on Ubuntu 20.04 it's ~/miniconda3/envs/MyEnv/bin/python
. "MyEnv" is the name of my conda environment.
use
pythonPath
option to set it to the python binary in conda environment. For me on Ubuntu 20.04 it's~/miniconda3/envs/MyEnv/bin/python
. "MyEnv" is the name of my conda environment.
I mean, but that won't activate the environment, will it?
When you do conda activate
it's just adding the env/bin to PATH
env variable. Same thing happens when you set pythonPath
.