For jupyter notebooks to identify your virtual env kernels:
- Activate your env and install
ipykernel:
pip install --user ipykernel
- Add your virtual environment to Jupyter:
python -m ipykernel install --user --name=myenv
And you should see:
Installed kernelspec myenv in /home/user/.local/share/jupyter/kernels/myenv
kernel.json:
{
"argv": [
"/home/user/anaconda3/envs/myenv/bin/python",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "myenv",
"language": "python"
}