-
Notifications
You must be signed in to change notification settings - Fork 137
Description
$python cli_demo.py
出现如下报错:
WebGLM Initializing...
[2023-12-27 07:26:49,014] [INFO] [real_accelerator.py:133:get_accelerator] Setting ds_accelerator to cuda (auto detect)
WebGLM Loaded
[Enter to Exit] >>> vitamin
[System] Searching ...
Traceback (most recent call last):
File "/mnt/inspurfs/user-fs/liuhongli/WebGLM-main/cli_demo.py", line 21, in
for results in webglm.stream_query(question):
File "/mnt/inspurfs/user-fs/liuhongli/WebGLM-main/model/modeling_webglm.py", line 35, in stream_query
refs = self.ref_retriever.query(question)
File "/mnt/inspurfs/user-fs/liuhongli/WebGLM-main/model/retriever/init.py", line 18, in query
search_results = self.searcher.search(question)
File "/mnt/inspurfs/user-fs/liuhongli/WebGLM-main/model/retriever/searching/bing_search.py", line 71, in search
return self._parse(query_bing(query))
File "/mnt/inspurfs/user-fs/liuhongli/WebGLM-main/model/retriever/searching/bing_search.py", line 43, in query_bing
results = get_bing_search_raw_page(question)
File "/mnt/inspurfs/user-fs/liuhongli/WebGLM-main/model/retriever/searching/bing_search.py", line 10, in get_bing_search_raw_page
browser = p.chromium.launch()
File "/usr/local/lib/python3.10/dist-packages/playwright/sync_api/_generated.py", line 14806, in launch
self._sync(
File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_sync_base.py", line 115, in _sync
return task.result()
File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_browser_type.py", line 95, in launch
Browser, from_channel(await self._channel.send("launch", params))
File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_connection.py", line 62, in send
return await self._connection.wrap_api_call(
File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_connection.py", line 492, in wrap_api_call
return await cb()
File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_connection.py", line 100, in inner_send
result = next(iter(done)).result()
playwright._impl._errors.Error:
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Please install them with the following command: ║
║ ║
║ playwright install-deps ║
║ ║
║ Alternatively, use apt: ║
║ apt-get install libgbm1 ║
║ ║
║ <3 Playwright Team ║
╚══════════════════════════════════════════════════════╝
继续安装相关依赖,提示如下错误,该怎么解决?
$ playwright install-deps
Installing dependencies...
Hit:1 http://mirrors.aliyun.com/ubuntu focal InRelease
Hit:2 http://mirrors.aliyun.com/ubuntu focal-security InRelease
Hit:3 http://mirrors.aliyun.com/ubuntu focal-updates InRelease
Hit:4 http://mirrors.aliyun.com/ubuntu focal-proposed InRelease
Hit:5 http://mirrors.aliyun.com/ubuntu focal-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package fonts-unifont
E: Unable to locate package libgdk-pixbuf-2.0-0
E: Couldn't find any package by glob 'libgdk-pixbuf-2.0-0'
E: Couldn't find any package by regex 'libgdk-pixbuf-2.0-0'
E: Unable to locate package libsoup-3.0-0
E: Couldn't find any package by glob 'libsoup-3.0-0'
E: Couldn't find any package by regex 'libsoup-3.0-0'
E: Unable to locate package libx264-163
Failed to install browser dependencies
Error: Installation process exited with code: 100