我是使用python和conda(以及linux(的新手,在python 3.9环境中运行Jupyter笔记本电脑时遇到了一些问题。我注意到基本的3.8.5环境可以工作(并允许我打开Jupyter 6.1.4(,但我不知道为什么。我已经通过conda update conda
和conda update anaconda
更新了anaconda和conda,并获得了相同的
# All requested packages already installed.
在anaconda navigator GUI中,当我尝试使用py39环境并在Jupyter上单击安装时,我注意到它试图安装Jupyter 6.0.3版本,我也收到了这个错误。
我还尝试将pykernel安装到我的env中(不确定它是否会对我的问题有所帮助(,我得到了:
$conda install ipykernel
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment:
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
`Specifications:
- ipykernel -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0']
Your python: python=3.9
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- ipykernel -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.8,<3.9.0a0|>=3.7,<3.8.0a0']
Your python: python=3.9
我想这就是Jupyter无法安装笔记本电脑的原因。我对这个东西真的很陌生,所以如果需要更多的细节,请告诉我。我真的不理解这个问题,也找不到类似的东西。
您可以按照以下步骤操作:
conda create -n py39 python=3.9
pip3 install --upgrade pip
pip3 install jupyter
- 转到anaconda提示符
- 激活py39
- 运行jupyter笔记本
- 根据您的机器更改路径后运行:
python C:ProgramDataAnaconda3envspy39Scriptspywin32_postinstall.py -install
- 从anaconda提示符运行:jupyter笔记本
- 检查Jupyter笔记本上的Python版本
Yo必须在终端中写入三个代码。
- conda-create-n py39-python=3.9
- pip3安装--升级pip
- pip3安装jupyter