nb_conda_kernels icon indicating copy to clipboard operation
nb_conda_kernels copied to clipboard

Cannot install nb_conda_kernels in base environment of fresh install of (mini)conda

Open neurorepro opened this issue 9 months ago • 5 comments

Steps:

  • Install miniconda
  • Set conda-forge as priority channel (channels: 1) conda-forge 2) defaults)
  • Try install nb_conda_kernels in base environments fails
$ conda install -n base jupyter nb_conda_kernels ipykernel jupyter_contrib_nbextensions
Channels:
 - conda-forge
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: \ warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - nothing provides _python_rc needed by python-3.12.0rc3-rc3_hab00c5b_1_cpython

Could not solve for environment specs
The following packages are incompatible
├─ nb_conda_kernels is installable with the potential options
│  ├─ nb_conda_kernels [1.0.3|2.0.0|...|2.2.3] would require
│  │  └─ python [2.7* |>=2.7,<2.8.0a0 ], which can be installed;
│  ├─ nb_conda_kernels [1.0.3|2.0.0] would require
│  │  └─ python 3.4* , which can be installed;
│  ├─ nb_conda_kernels [1.0.3|2.0.0|2.1.0|2.1.1] would require
│  │  └─ python 3.5* , which can be installed;
│  ├─ nb_conda_kernels [2.0.0|2.1.0|2.1.1] would require
│  │  └─ python 3.6* , which can be installed;
│  ├─ nb_conda_kernels [2.1.0|2.1.1|...|2.3.1] would require
│  │  └─ python >=3.6,<3.7.0a0 , which can be installed;
│  ├─ nb_conda_kernels [2.1.0|2.1.1|...|2.3.1] would require
│  │  └─ python >=3.7,<3.8.0a0 , which can be installed;
│  ├─ nb_conda_kernels [2.2.2|2.2.3|2.2.4|2.3.0|2.3.1] would require
│  │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│  ├─ nb_conda_kernels [2.3.0|2.3.1] would require
│  │  └─ python >=3.9,<3.10.0a0 , which can be installed;
│  ├─ nb_conda_kernels 2.3.1 would require
│  │  └─ python >=3.10,<3.11.0a0 , which can be installed;
│  ├─ nb_conda_kernels 2.3.1 would require
│  │  └─ python >=3.11,<3.12.0a0 , which can be installed;
│  ├─ nb_conda_kernels [2.3.1|2.5.0|2.5.1] would require
│  │  └─ python >=3.8,<3.12  with the potential options
│  │     ├─ python [3.10.0|3.10.1|...|3.10.9], which can be installed;
│  │     ├─ python [3.11.0|3.11.1|...|3.11.9], which can be installed;
│  │     ├─ python [3.8.0|3.8.1|...|3.8.8], which can be installed;
│  │     ├─ python [3.9.0|3.9.1|...|3.9.9], which can be installed;
│  │     └─ python 3.12.0rc3 would require
│  │        └─ _python_rc, which does not exist (perhaps a missing channel);
│  ├─ nb_conda_kernels [2.3.1|2.5.0|2.5.1] would require
│  │  └─ __win, which is missing on the system;
│  └─ nb_conda_kernels 2.3.1 would require
│     └─ python >=3.8,<3.11 , which can be installed;
└─ pin-1 is not installable because it requires
   └─ python 3.12.* , which conflicts with any installable versions previously reported.

neurorepro avatar Apr 25 '24 13:04 neurorepro

Bumpy bump

neurorepro avatar May 22 '24 15:05 neurorepro

The strange error is that one:

│  ├─ nb_conda_kernels [2.3.1|2.5.0|2.5.1] would require
│  │  └─ __win, which is missing on the system;

For your information only 2.5.1 build 2 (the latest version) is compatible with Python 3.12. A possible work around would be to pin Python to 3.11 for your new installation.

fcollonval avatar May 23 '24 07:05 fcollonval

I am having the same problem.

(base) C:\Users\WAL>conda install nb_conda_kernels
Channels:
 - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
 - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
 - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
 - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
 - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
 - defaults
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: | warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package nb_conda_kernels-1.0.3-py27_0 requires python 2.7*, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
├─ nb_conda_kernels is installable with the potential options
│  ├─ nb_conda_kernels [1.0.3|2.0.0|...|2.2.2] would require
│  │  └─ python [2.7* |>=2.7,<2.8.0a0 ], which can be installed;
│  ├─ nb_conda_kernels [1.0.3|2.0.0] would require
│  │  └─ python 3.4* , which can be installed;
│  ├─ nb_conda_kernels [1.0.3|2.0.0|2.1.0] would require
│  │  └─ python 3.5* , which can be installed;
│  ├─ nb_conda_kernels [2.0.0|2.1.0|...|2.3.1] would require
│  │  └─ python [3.6* |>=3.6,<3.7.0a0 ], which can be installed;
│  ├─ nb_conda_kernels [2.1.0|2.1.1|...|2.3.1] would require
│  │  └─ python >=3.7,<3.8.0a0 , which can be installed;
│  ├─ nb_conda_kernels [2.2.3|2.2.4|2.3.0|2.3.1] would require
│  │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│  ├─ nb_conda_kernels 2.3.1 would require
│  │  └─ python >=3.10,<3.11.0a0 , which can be installed;
│  ├─ nb_conda_kernels 2.3.1 would require
│  │  └─ python >=3.11,<3.12.0a0 , which can be installed;
│  └─ nb_conda_kernels 2.3.1 would require
│     └─ python >=3.9,<3.10.0a0 , which can be installed;
└─ pin-1 is not installable because it requires
   └─ python 3.12.* , which conflicts with any installable versions previously reported.

Pins seem to be involved in the conflict. Currently pinned specs:
 - python 3.12.* (labeled as 'pin-1')

It seems that the package pin-1 conflicts with my python version of base env. However it has certainly been 3.12.1:

(base) C:\Users\WAL>python --version
Python 3.12.1

I think I have to create a new conda env for my jupyter now instead of base.

cangkui avatar May 27 '24 03:05 cangkui

@cangkui and @neurorepro

Could you try installing nb_conda_kernel using the spec

for windows: nb_conda_kernels=2.5.1=pyh7428d3b_2 for non-windows: nb_conda_kernels=2.5.1=pyh707e725_2

If it works, please report here so it will help fixing that issue.

fcollonval avatar May 28 '24 14:05 fcollonval

I also had the same issue, but tried to specify conda-forge explicitly as a channel then it worked:

conda install -c conda-forge nb_conda_kernels

amine-aboufirass avatar Jun 29 '24 14:06 amine-aboufirass