我不熟悉使用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版,并且我也得到了this error.
我还尝试将pykernel安装到我的环境中(不确定是否会做任何事情来解决我的问题)
$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无法安装笔记本的原因。我真的是新手,所以如果需要我提供更多详细信息,请告诉我。我不太了解这个问题,也找不到类似的东西。
答案 0 :(得分:1)
您可以按照以下步骤操作:
this.bestMove = findBestMove(board);
conda create -n py39 python=3.9
pip3 install --upgrade pip
pip3 install jupyter
答案 1 :(得分:0)
基于Pushpendra Singh Nathavat的回应,我尝试的方法是:
// CallExtensionFunction.java
package com.example.groundup;
public class CallExtensionFunction {
public static void main(String[] args) {
MyModel myModel = new MyModel();
int bar = MyModelKt.bar(myModel);
System.out.println(bar);
}
}
// MyModell.kt
package com.example.groundup
fun MyModel.bar(): Int {
return this.name.length
}
class MyModel() {
val name = "Hugo"
}
您可以使用以下方法检查笔记本中的Python版本:
conda create -n py39 python=3.9 -y
conda activate py39
pip install jupyter
jupyter notebook
答案 2 :(得分:-1)
您必须在终端中编写三个代码。