我正在按照文档上的步骤尝试为jupyter安装C内核。威奇是
> pip install jupyter-c-kernel
> install_c_kernel
> jupyter-notebook
第二步,出现以下错误:
Traceback (most recent call last):
File "/usr/local/bin/install_c_kernel", line 8, in <module>
from jupyter_client.kernelspec import KernelSpecManager
ModuleNotFoundError: No module named 'jupyter_client.kernelspec'
显然,它无法识别该模块,而且我也不知道如何解决它。有人可以帮助我吗?
答案 0 :(得分:0)
loadUsers = () => {
Users = [
]
var query = firebase.database().ref("users").orderByKey();
query.once("value")
.then((snapshot) => {
snapshot.forEach((childSnapshot) => {
// key will be "ada" the first time and "alan" the second time
var key = childSnapshot.key;
// childData will be the actual contents of the child
var childData = childSnapshot.val();
this.setState({isLoading: true});
getFilmDetailFromApi(childData.filmID).then(data => {
km = this.getDistance(this.state.userData.latitude, this.state.userData.longitude, childData.latitude, childData.longitude)
photo0 = null;
photo1 = null;
photo2 = null;
photo3 = null;
photo4 = null;
photo5 = null;
if(childData.photo[0]) {
photo0 = {uri: childData.photo[0]}
}
if(childData.photo[1]) {
photo1 = {uri: childData.photo[1]}
}
if(childData.photo[2]) {
photo2 = {uri: childData.photo[2]}
}
if(childData.photo[3]) {
photo3 = {uri: childData.photo[3]}
}
if(childData.photo[4]) {
photo4 = {uri: childData.photo[4]}
}
if(childData.photo[5]) {
photo5 = {uri: childData.photo[5]}
}
var filmImage = data.poster_path
Users.push({ id: key, uri: photo0, uri1: photo1, uri2: photo2, uri3: photo3, uri4: photo4, uri5: photo5, nom: childData.name, age:childData.age, film: filmImage, description: childData.description, distance: km })
this.setState({ users: key, isLoading: false });
})
this.setState({Users: Users});});
this.setState({currentIndex: 0});
});
}
是对我有用的命令,在此处的仓库中建议在Github问题上使用此命令:https://github.com/brendan-rius/jupyter-c-kernel/issues/38
如果您仔细阅读问题,它也会显示为bash,但是当您打开笔记本时,它显示为C。
如果您已经打开install_c_kernel --user
笔记本,则可以从菜单中选择.ipynb
,并在底部提供更改内核的选项。