我正试图在我的mac M1上使用voila运行一个jupyter笔记本。但是,当我运行pip3 install voila时,安装成功,但是当运行voila时,我会得到以下错误:
Traceback (most recent call last):
File "/opt/homebrew/bin/voila", line 8, in <module>
sys.exit(main())
File "/opt/homebrew/lib/python3.9/site-packages/traitlets/config/application.py", line 845, in launch_instance
app.initialize(argv)
File "/opt/homebrew/lib/python3.9/site-packages/voila/app.py", line 370, in initialize
self.setup_template_dirs()
File "/opt/homebrew/lib/python3.9/site-packages/voila/app.py", line 376, in setup_template_dirs
self.template_paths = collect_template_paths(['voila', 'nbconvert'], template_name, prune=True)
File "/opt/homebrew/lib/python3.9/site-packages/voila/paths.py", line 24, in collect_template_paths
return collect_paths(app_names, template_name, include_root_paths=True, prune=prune, root_dirs=root_dirs)
File "/opt/homebrew/lib/python3.9/site-packages/voila/paths.py", line 90, in collect_paths
raise ValueError(
ValueError: No template sub-directory with name 'base' found in the following paths:我一直试图通过从其他文件夹中指定模板来解决这个问题,但目前没有任何工作。
which voila返回/opt/homebrew/bin/voila
which python3返回/opt/homebrew/bin/python3
有什么想法吗?谢谢
发布于 2022-07-12 03:28:48
模板似乎安装在/opt/homebrew/share/jupyter下。
voila在木星的任何位置上都找不到模板dirs:
jupyter --paths修复它的一种方法是将模板dirs链接到voila正在查看的位置之一(我根据上面命令的输出选择了~/Library/Jupyter ):
首先,确保文件夹存在:
mkdir -p ~/Library/Jupyter/voila
mkdir -p ~/Library/Jupyter/nbconvert然后链接模板dirs:
ln -s /opt/homebrew/share/jupyter/voila/templates ~/Library/Jupyter/voila/templates
ln -s /opt/homebrew/share/jupyter/nbconvert/templates ~/Library/Jupyter/nbconvert/templateshttps://stackoverflow.com/questions/69990611
复制相似问题