![]() |
|
安装pyppeteer遇到问题,大家是怎么解决的? - Printable Version +- Proxy Community (https://proxycommunity.com/forum) +-- Forum: Use Case (https://proxycommunity.com/forum/forum-use-case) +--- Forum: Web Scraping (https://proxycommunity.com/forum/forum-web-scraping) +--- Thread: 安装pyppeteer遇到问题,大家是怎么解决的? (/thread-%E5%AE%89%E8%A3%85pyppeteer%E9%81%87%E5%88%B0%E9%97%AE%E9%A2%98%EF%BC%8C%E5%A4%A7%E5%AE%B6%E6%98%AF%E6%80%8E%E4%B9%88%E8%A7%A3%E5%86%B3%E7%9A%84%EF%BC%9F) |
安装pyppeteer遇到问题,大家是怎么解决的? - Ozito777 - 09-09-2024 Hey guys, So I was trying to 安装pyppeteer today and ran into some weird errors... like, it keeps saying "Chromium download failed" or something? I followed the docs but no luck. Anyone else had this issue? How’d you fix it? Also, my Python version is 3.8, dunno if that matters. Tried pip install pyppeteer --upgrade too, still stuck. Pls help a noob out lol. Thanks in advance! (btw, if u know any workarounds for the chromium thing, lmk!) “” - darkRun77 - 15-10-2024 Chromium download fails are super common with 安装pyppeteer, especially on slower networks. Try setting the env var before installing: `PYPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrors pip install pyppeteer` This uses a mirror in China, way faster. Also, check if your firewall/AV is blocking the download. “” - cloakJumpX - 25-11-2024 Yo, had the same issue last week! Turns out pyppeteer's default chromium version was bugged for me. Workaround: install chromium separately and point pyppeteer to it: ``` import pyppeteer pyppeteer.chromium_executable = "/path/to/your/chromium" ``` Saved me hours of headache. GL! “” - darkHawkX - 14-02-2025 3.8 might actually be the problem lol. Pyppeteer works better with 3.9+. Try creating a fresh venv with python 3.9 and: `pip install -U pyppeteer` If still stuck, this GitHub thread has legit fixes: [insert github pyppeteer issues link] “” - proxyHawk99 - 28-02-2025 Bro just use playwright instead. Way more stable than 安装pyppeteer these days. `pip install playwright playwright install chromium` Done. No download errors, better docs, actively maintained. Thank me later. “” - IPVeil88 - 06-03-2025 Had this EXACT error yesterday! Fixed it by: 1. Deleting ~/.pyppeteer folder 2. Running as admin (weird but worked) 3. Using VPN (my ISP was blocking something) Also try `--trusted-host pypi.org --trusted-host files.pythonhosted.org` with pip “” - Ozito777 - 08-03-2025 Hey thanks everyone for the suggestions! Tried the taobao mirror thing and it WORKED (after 3 attempts lol). Weird that the docs don't mention this - would've saved me 2 days. Now getting some async errors but at least chromium's there. Might check out playwright like some suggested. You guys rock! “” - stealthCipher99 - 17-03-2025 Pro tip: Skip the headache and use docker. `docker run -it python:3.8 bash pip install pyppeteer` Works every time for me. Containers don't care about your local network issues. “” - deepMimicX77 - 19-03-2025 Chromium thing happens when your system misses libs. On Ubuntu/Debian do: `sudo apt-get install -y gconf-service libasound2... [etc]` Full list here: [chromium deps docs link] Also try `export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1` first “” - loganStealth88 - 23-03-2025 Lol welcome to pyppeteer hell. The maintainers basically abandoned it. Either: - Use the taobao mirror like others said - OR download chromium manually from [official chromium link] and set path - OR switch to playwright (seriously) |