Torch.cuda.is_available() returns False only for jupyter notebook

… but in console env it returns true
image

Cuda toolkit version: 10.2

Any ideas why?

Most likely because the Jupyter notebook isn’t using the same Python kernel.
You can select the Python kernel inside the notebook to make sure you are using the same, which is called in your terminal.

Also, a bit unrelated, but I personally prefer to create conda environments to avoid these conflicts. :wink:

I figure it out :D. You are right.

This command isn’t working properly with conda env.

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

Instead, we should first install nb_conda_kernels in active conda env

conda install -n notebook_env nb_conda_kernels

and then run above command like this.

python -m ipykernel install --user --name notebook_env --display-name "Python (notebook_env)"