尝试使用
conda install jupyter
安装 jupyter,在 Anaconda 提示符下,出现 pin-1 in not installable because it requires python 3.12
我安装了python 3.11,我安装的miniconda版本使用的是python 3.11。
还有其他方法安装jupyter吗?
完整的错误回溯:
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 jupyter-1.0.0-py27_4 requires python >=2.7,<2.8.0a0, but none of the providers can be installed
Could not solve for environment specs
The following packages are incompatible
├─ jupyter is installable with the potential options
│ ├─ jupyter 1.0.0 would require
│ │ └─ python >=2.7,<2.8.0a0 , which can be installed;
│ ├─ jupyter 1.0.0 would require
│ │ └─ python >=3.10,<3.11.0a0 , which can be installed;
│ ├─ jupyter 1.0.0 would require
│ │ └─ python >=3.11,<3.12.0a0 , which can be installed;
│ ├─ jupyter 1.0.0 would require
│ │ └─ python >=3.5,<3.6.0a0 , which can be installed;
│ ├─ jupyter 1.0.0 would require
│ │ └─ python >=3.6,<3.7.0a0 , which can be installed;
│ ├─ jupyter 1.0.0 would require
│ │ └─ python >=3.7,<3.8.0a0 , which can be installed;
│ ├─ jupyter 1.0.0 would require
│ │ └─ python >=3.8,<3.9.0a0 , which can be installed;
│ └─ jupyter 1.0.0 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')
你可以这样做:
conda install python=3.10
然后,重新运行此命令:
conda install jupyter
只需在您的环境中安装版本在 3.10 - 3.11 之间的 python
我刚刚用这个命令解决了这个问题 第一:
conda安装python=3.10
然后:
conda 安装 jupyter
Anaconda 默认基本环境包含很多您永远不会使用的内容,但每当您想要添加某些内容时,都会增加包兼容性的复杂性。
在这里,有一个替代解决方案可以“创建一个最小的环境”来满足您的需求? (然后切换到 JupyterLab。是时候了。)
此外,创建新的自定义环境将利用 conda
,这将确保基本包之间的兼容性。使用如下命令:
conda create -n yournewenvname python jupyterlab环境激活后,例如,这个可以让您立即运行 jupyterlab。今天测试,已安装:
conda 列表 python # python 3.11.7
conda 列表 jupyterlab # jupyterlab 4.0.8
Python 版本 3.11 和 jupyter现在,如果您希望维护
,请改用它:
conda create -n yournewenvname python=3.11 jupyter