Jupyter notebook new kernal issue

Hi Team,

I have insalled conda virtual env in /abc location not in default location by

conda config --aapned envs_dir /abc
conda create --name test1 --file spec-file.txt (spec-file.txt having python 3.7)
conda create --name python=3.7 test1 --file spec-file.txt

then i have added kernal to jupyter
python -m ipykernel install --user --name=test1

test1 kernel is visible in notebook but it is refrering my base python that is 3.8 i want kernal with 3.7 that is in spec-file.txt
later i have updated kernal.json arg to python 3.7 location it is working perfectaly.

but i donot want to updated mannauly any way so that kernal will refer to only virtual env python

python -m ipykernel install --user --name=test1

This command uses the python executable currently on your $PATH, and therefore creates a kernelspec for whatever your current Python environment is. From your steps, you have created an environment but not activated it, which would mean installing a kernelspec for your default env. You generally need to specify the Python to use explicitly, either via path:

/path/to/env/bin/python -m ipykernel install --user --name=test1

or activate the env (conda activate test1) to install a kernel from a given env.

Thanks for update,

I am having 3 kernel with different python version & I want all 3 kernel should be available from notebook so i need to active all kernel permanently then only it will be available?