目录
- 01 使用jupyter遇到的问题
- 1.1 Python requires ipykernel installed or requires an update
- 1.1.1 查询所有内核
- 1.1.2 选择对应的Python版本
- 02 理解jupyter规则
- 2.1 系统命令
01 使用jupyter遇到的问题
1.1 Python requires ipykernel installed or requires an update
1.1.1 查询所有内核
jupyter kernelspec list
- 可知,此时支持jupyter的
Python内核为3.11.
1.1.2 选择对应的Python版本
- 我们选择该版本的
Python 3.11即可成功运行jupyter cell。


02 理解jupyter规则
2.1 系统命令
- 在Jupyter Notebook中,前缀
!用于执行系统命令。比如
!pip install numpy
-
这行代码会在当前的Python环境中运行系统命令
pip install numpy,从而安装numpy包。 -
具体来说,
!告诉Jupyter Notebook解释器,这行代码不是Python代码,而是一个需要在操作系统的命令行中执行的命令。这样,您可以直接在Notebook中运行诸如pip install、ls、cd等命令,而无需离开Notebook环境。
- Jupyter Notebooks in VS Code







![[译] Go语言的源起,发展和未来](https://img-blog.csdnimg.cn/img_convert/c7231611d4b7b070948f773ef31c15c7.png)










