Juypter将模块安装到特定内核

2024-04-26 17:59:11 发布

您现在位置:Python中文网/ 问答频道 /正文

在我的Jupyter终端中,我做了一个pip install azure-storage,但是每当我去我的笔记本并尝试import azure-storage,我就会得到一个module not found的错误。你知道吗

再四处看看,我发现命令jupyter kernelspec list-返回:

Available kernels:                                                                                                                  
  python2           /usr/bin/anaconda/lib/python2.7/site-packages/ipykernel/resources                                               
  pyspark3kernel    /usr/local/share/jupyter/kernels/pyspark3kernel                                                                 
  pysparkkernel     /usr/local/share/jupyter/kernels/pysparkkernel                                                                  
  sparkkernel       /usr/local/share/jupyter/kernels/sparkkernel  

现在我在想,如果我做了pip install <whatever>,它将是一个内核,而不是我想要使用的内核,因此我得到了module not found。你知道吗

听起来有效吗?你知道吗

如果是这样,我该如何安装到pyspark3kernel?你知道吗

另外,我还尝试直接在我的笔记本中使用!!pip install azure-storage,但是这会不断返回语法错误。你知道吗

谢谢你的帮助。你知道吗

谢谢。你知道吗


Tags: installpipshareusrlocalnot笔记本jupyter