我正在使用Windows 10!
我删除了Python 3.7 32位并安装了3.7.5 64位之后,Jupyter Notebook和Lab停止工作。 (Anaconda在我的计算机上无法使用... Qt问题,尚未解决!因此我使用pip来安装或删除软件包)
我使用程序管理器删除后,python目录仍然存在。然后,我更改了目录名称并重新开始(删除和安装)。
这次,Jupyter Notebook重新投入使用:-),但是当我尝试启动实验室时,我得到了这个:-/
我该怎么办?
c:\Python>jupyter lab
Traceback (most recent call last):
File "c:\python\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python\Scripts\jupyter.exe\__main__.py", line 9, in <module>
File "c:\python\lib\site-packages\jupyter_core\command.py", line 247, in main
command = _jupyter_abspath(subcommand)
File "c:\python\lib\site-packages\jupyter_core\command.py", line 134, in _jupyter_abspath
'Jupyter command `{}` not found.'.format(jupyter_subcommand)
Exception: Jupyter command `jupyter-lab` not found.
这样的安装后,卸载并重新安装Jupyter而不是重定向可能更安全,它可以省去很多麻烦。通过以下方式可以删除依赖项,以进行更干净的卸载,然后重新安装。
$ pip install pip-autoremove
$ pip-autoremove jupyter -y
$ pip install jupyter
(或者,如果您拥有Python 2和3)
$ python3 -m pip install jupyter
祝你好运!