[英]Module not found when trying to run `black` in a Jupyter notebook
I've created a Jupyter notebook inside of a virtual environment.我在虚拟环境中创建了一个 Jupyter notebook。
These packages are installed:这些软件包已安装:
black==22.12.0
jupyter~= 1.0.0
jupyter-black==0.3.3
jupyter-contrib-nbextensions~=0.5.1
In my notebook, there's a button with a little gavel to run black
code formatting.在我的笔记本中,有一个带有小木槌的按钮可以运行
black
代码格式化。 However, when I click this, I get the error message:但是,当我单击它时,我收到错误消息:
localhost:8888 says
[jupyter-black]
Error:ModuleNotFoundError
No module named 'black'
I've made sure I'm using the kernel created inside this virtual environment.我已经确定我使用的是在这个虚拟环境中创建的内核。
Reading through the docs has not pointed out any obvious errors I'm making here.通读文档并没有指出我在这里犯的任何明显错误。 Any suggestions on getting
black
to run appropriately?关于让
black
正常运行的任何建议?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.