我在一本木星笔记本里跑进牢房里
!pip3 install tabulate
它回来了
Requirement already satisfied: tabulate in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (0.8.10)
当我跑的时候
!pip3 freeze
我在看tabulate==0.8.10
。
但是,当我现在尝试通过
from tabulate import tabulate
它抛出
ModuleNotFoundError: No module named 'tabulate'
即使我重新启动内核,它也无法工作。
有人能帮我解释一下为什么不能导入它吗?
发布于 2022-10-04 06:53:45
使用
%pip install <module-name>
而不是在jupyter笔记本单元中的!pip install <module-name>
解决了这个问题。
这个答案来自“韦恩”。
https://stackoverflow.com/questions/73910712
复制相似问题