anaconda / nb_conda_kernels

Package for managing conda environment-based kernels inside of Jupyter
BSD 3-Clause "New" or "Revised" License
588 stars 70 forks source link

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

Open neurorepro opened 4 months ago

neurorepro commented 4 months ago

Steps:

LibMambaUnsatisfiableError: Encountered problems while solving:

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 commented 3 months ago

Bumpy bump

fcollonval commented 3 months ago

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.

cangkui commented 3 months ago

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.

fcollonval commented 3 months ago

@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.

amine-aboufirass commented 2 months ago

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