如何修复 Jupyter Hub No such file or directory: 'configurable-http-proxy'
问题:
尝试启动 Jupyter Hub 时,你看到类似这样的错误消息
jupyterhub_proxy_error.txt
[E 2021-06-18 13:07:48.462 JupyterHub proxy:711] Failed to find proxy ['configurable-http-proxy']
The proxy can be installed with `npm install -g configurable-http-proxy`.To install `npm`, install nodejs which includes `npm`.If you see an `EACCES` error or permissions error, refer to the `npm` documentation on How To Prevent Permissions Errors.
[C 2021-06-18 13:07:48.462 JupyterHub app:2739] Failed to start proxy
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/app.py", line 2737, in start
await self.proxy.start()
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/proxy.py", line 707, in start
self.proxy_process = Popen(
File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'configurable-http-proxy'解决方案
如 Jupyter Hub 安装文档所述,你需要安装 configurable-http-proxy npm 包才能使 Jupyter 工作:
install_configurable_http_proxy.sh
sudo npm install -g configurable-http-proxy如果你尚未安装 npm,请参见我们关于如何在 1 分钟内在 Ubuntu 上安装 NodeJS 14.x LTS的文章或在 NodeJS 下载页面上为你的操作系统找到合适的发行版。
Check out similar posts by category:
Python
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow