为什么jupyter notebook的pip list和命令窗口显示的不一样
时间: 2023-08-22 10:08:36 浏览: 220
可能是因为你的Jupyter Notebook是在一个虚拟环境中运行的,而命令窗口是在全局环境中运行的。如果你在虚拟环境中安装了一些包,那么在Jupyter Notebook中使用`pip list`命令只会显示虚拟环境中安装的包。而在命令窗口中使用`pip list`命令会显示全局环境中安装的包。你可以在Jupyter Notebook中输入以下命令来查看当前使用的Python环境:
```python
import sys
print(sys.executable)
```
如果输出的路径包含了你的虚拟环境名称,那么你就在虚拟环境中运行Jupyter Notebook了。
阅读全文
相关推荐
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)