Exception: Jupyter command `jupyter-lab` not found.解决方法

本文讲述了在使用conda创建的虚拟环境中运行JupyterLab时遇到的错误,即`jupyter-lab`命令未找到。提供了手动安装JupyterLab的方法,并给出了StackOverflow上的参考链接,帮助读者解决该问题。
部署运行你感兴趣的模型镜像

问题描述

  • 在 conda 创建的虚拟环境中运行 jupyter lab 报错:
Traceback (most recent call last):
  File "/Users/username/opt/anaconda3/envs/pytorch171py37/bin/jupyter", line 11, in <module>
    sys.exit(main())
  File "/Users/username/opt/anaconda3/envs/pytorch171py37/lib/python3.7/site-packages/jupyter_core/command.py", line 285, in main
    command = _jupyter_abspath(subcommand)
  File "/Users/username/opt/anaconda3/envs/pytorch171py37/lib/python3.7/site-packages/jupyter_core/command.py", line 125, in _jupyter_abspath
    'Jupyter command `{}` not found.'.format(jupyter_subcommand)
Exception: Jupyter command `jupyter-lab` not found.

解决方法

  • 手动安装 jupyter lab
python -m pip install jupyterlab

参考

  • https://stackoverflow.com/questions/57677481/jupyter-command-jupyter-lab-not-found

您可能感兴趣的与本文相关的镜像

Python3.8

Python3.8

Conda
Python

Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本

C:\Users\29140>pip install --upgrade --force-reinstall traitlets notebook jupyter-core Collecting traitlets Using cached traitlets-5.14.3-py3-none-any.whl (85 kB) Collecting notebook Using cached notebook-7.4.7-py3-none-any.whl (14.3 MB) Collecting jupyter-core Using cached jupyter_core-5.8.1-py3-none-any.whl (28 kB) Collecting jupyter-server<3,>=2.4.0 Using cached jupyter_server-2.17.0-py3-none-any.whl (388 kB) Collecting notebook-shim<0.3,>=0.2 Using cached notebook_shim-0.2.4-py3-none-any.whl (13 kB) Collecting jupyterlab-server<3,>=2.27.1 Using cached jupyterlab_server-2.28.0-py3-none-any.whl (59 kB) Collecting tornado>=6.2.0 Using cached tornado-6.5.2-cp39-abi3-win_amd64.whl (445 kB) Collecting jupyterlab<4.5,>=4.4.9 Using cached jupyterlab-4.4.10-py3-none-any.whl (12.3 MB) Collecting platformdirs>=2.5 Using cached platformdirs-4.4.0-py3-none-any.whl (18 kB) Collecting pywin32>=300 Downloading pywin32-311-cp39-cp39-win_amd64.whl (9.6 MB) | | 10 kB 5.9 kB/s eta 0:27:18ERROR: Exception: Traceback (most recent call last): File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 438, in _error_catcher yield File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 519, in read data = self._fp.read(amt) if not fp_closed else b"" File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read data = self.__fp.read(amt) File "D:\Python_evn\python2020.1\anaconda3\lib\http\client.py", line 462, in read n = self.readinto(b) File "D:\Python_evn\python2020.1\anaconda3\lib\http\client.py", line 506, in readinto n = self.fp.readinto(b) File "D:\Python_evn\python2020.1\anaconda3\lib\socket.py", line 704, in readinto return self._sock.recv_into(b) File "D:\Python_evn\python2020.1\anaconda3\lib\ssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "D:\Python_evn\python2020.1\anaconda3\lib\ssl.py", line 1099, in read return self._sslobj.read(len, buffer) socket.timeout: The read operation timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\cli\base_command.py", line 173, in _main status = self.run(options, args) File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\cli\req_command.py", line 203, in wrapper return func(self, options, args) File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\commands\install.py", line 315, in run requirement_set = resolver.resolve( File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 94, in resolve result = self._result = resolver.resolve( File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 472, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 366, in resolve failure_causes = self._attempt_to_pin_criterion(name) File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 212, in _attempt_to_pin_criterion criteria = self._get_updated_criteria(candidate) File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 203, in _get_updated_criteria self._add_to_criteria(criteria, requirement, parent=candidate) File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 172, in _add_to_criteria if not criterion.candidates: File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 151, in __bool__ return bool(self._sequence) File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 140, in __bool__ return any(self) File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 128, in <genexpr> return (c for c in iterator if id(c) not in self._incompatible_ids) File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 32, in _iter_built candidate = func() File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 204, in _make_candidate_from_link self._link_candidate_cache[link] = LinkCandidate( File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 295, in __init__ super().__init__( File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 156, in __init__ self.dist = self._prepare() File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 227, in _prepare dist = self._prepare_distribution() File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 305, in _prepare_distribution return self._factory.preparer.prepare_linked_requirement( File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 508, in prepare_linked_requirement return self._prepare_linked_requirement(req, parallel_builds) File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 550, in _prepare_linked_requirement local_file = unpack_url( File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 239, in unpack_url file = get_http_url( File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\operations\prepare.py", line 102, in get_http_url from_path, content_type = download(link, temp_dir.path) File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\network\download.py", line 145, in __call__ for chunk in chunks: File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\cli\progress_bars.py", line 144, in iter for x in it: File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_internal\network\utils.py", line 63, in response_chunks for chunk in response.raw.stream( File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 576, in stream data = self.read(amt=amt, decode_content=decode_content) File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 541, in read raise IncompleteRead(self._fp_bytes_read, self.length_remaining) File "D:\Python_evn\python2020.1\anaconda3\lib\contextlib.py", line 137, in __exit__ self.gen.throw(typ, value, traceback) File "D:\Python_evn\python2020.1\anaconda3\lib\site-packages\pip\_vendor\urllib3\response.py", line 443, in _error_catcher raise ReadTimeoutError(self._pool, None, "Read timed out.") pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.这是什么情况
最新发布
11-13
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

csdn-WJW

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值