无法使用python 3.9 env运行Jupyter Notebook



我是使用python和conda(以及linux(的新手,在python 3.9环境中运行Jupyter笔记本电脑时遇到了一些问题。我注意到基本的3.8.5环境可以工作(并允许我打开Jupyter 6.1.4(,但我不知道为什么。我已经通过conda update condaconda 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无法安装笔记本电脑的原因。我对这个东西真的很陌生,所以如果需要更多的细节,请告诉我。我真的不理解这个问题,也找不到类似的东西。

您可以按照以下步骤操作:

  1. conda create -n py39 python=3.9
  2. pip3 install --upgrade pip
  3. pip3 install jupyter
  4. 转到anaconda提示符
  5. 激活py39
  6. 运行jupyter笔记本
  7. 根据您的机器更改路径后运行:python C:ProgramDataAnaconda3envspy39Scriptspywin32_postinstall.py -install
  8. 从anaconda提示符运行:jupyter笔记本
  9. 检查Jupyter笔记本上的Python版本

Yo必须在终端中写入三个代码。

  1. conda-create-n py39-python=3.9
  2. pip3安装--升级pip
  3. pip3安装jupyter

最新更新