我在 macOS Big Sur 上,运行安装了 homebrew 的 python3.9。我的旧 jupyter 有一些路径链接问题,所以我卸载了它。我不记得我过去是如何安装 jupyter 的,所以我手动在 /usr/local/bin 和 /usr/local/Cellar 中 rm jupyter 文件。
然后我使用 pip3 install 重新安装了 jupyter-lab。然后当我运行 jupyter lab
时,它给了我回溯:
File "/usr/local/bin/jupyter", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/jupyter_core/command.py", line 285, in main
command = _jupyter_abspath(subcommand)
File "/usr/local/lib/python3.9/site-packages/jupyter_core/command.py", line 124, in _jupyter_abspath
raise Exception(
Exception: Jupyter command `jupyter-lab` not found.
但是,我已经检查了 jupyter notebook 命令。它工作得很好。看来我只是缺少 jupyter-lab 文件。我该怎么办?