Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nb_conda_kernels not detecting conda environments #126

Closed
dagingehelgoy opened this issue Feb 12, 2019 · 4 comments
Closed

nb_conda_kernels not detecting conda environments #126

dagingehelgoy opened this issue Feb 12, 2019 · 4 comments

Comments

@dagingehelgoy
Copy link

dagingehelgoy commented Feb 12, 2019

I am struggeling to get my nb_conda_kernels to detect my conda envs. While jupyter kernelspec only sees my base environment, conda has listed 3.

(base) jupyter kernelspec list
Available kernels:
  python3    C:\ProgramData\Anaconda3\share\jupyter\kernels\python3
# conda environments:
#
base                  *  C:\ProgramData\Anaconda3
vsb                      C:\ProgramData\Anaconda3\envs\vsb
test_gpu                 C:\Users\DayNoone\.conda\envs\test_gpu

However, it looks like nb_conda_kernels finds one of these environments (test_gpu)
image

@dagingehelgoy dagingehelgoy changed the title Uninstalling nb_conda_kernels nb_conda_kernels not detecting conda environments Feb 12, 2019
@tdpetrou
Copy link

Looks like this is an issue with conda channel that you have downloaded nb_conda_kernels from. The latest commit was not pushed to conda defaults or conda-forge. It is available on jupycon.

conda install jupycon/label/dev::nb_conda_kernels

Whats happening is that the active environment is not showing up. This is an issue with the manager.py file. Before the last commit it has this line in the _all_envs method which was skipping the current environment.

if env_path == sys.prefix:
    continue

I would just install from the above channel. As a bad workaround you can start your notebooks from an environment other than the one you would like to actually run.

@Zsailer
Copy link

Zsailer commented Feb 15, 2019

This difference between your kernelspec list and your notebook's available kernels is the consequence of nb_conda_kernels' design.

It does not add kernelspecs to your jupyter data files. Rather, it dynamically creates kernels from your conda environments when jupyter is launched using a custom CondaKernelSpecManager object.

@mcg1969
Copy link
Collaborator

mcg1969 commented Feb 23, 2019

The screenshot you posted is for the nb_conda extension, which is not the same as nb_conda_kernels.

@mcg1969
Copy link
Collaborator

mcg1969 commented Feb 24, 2019

Also, jupyter kernelspec cannot make use of nb_conda_kernels... yet. See here.

@mcg1969 mcg1969 closed this as completed Feb 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants