python-shell icon indicating copy to clipboard operation
python-shell copied to clipboard

How to activate conda environment and run python.

Open kiranm15 opened this issue 4 years ago • 3 comments

How do I activate the conda environment and run python?

kiranm15 avatar Jun 12 '20 14:06 kiranm15

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.

shivamsingha avatar Apr 08 '21 17:04 shivamsingha

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?

Jaliborc avatar Aug 04 '21 23:08 Jaliborc

When you do conda activate it's just adding the env/bin to PATH env variable. Same thing happens when you set pythonPath.

shivamsingha avatar Aug 06 '21 13:08 shivamsingha