Rishu Sharma
Rishu Sharma

Reputation: 57

Error in playwright python installation Ubuntu 24.04

I am trying to install playwright on my machine running Ubuntu 24.04 but I got this error

playwright install                                                                                                                     ─╯
Playwright Host validation warning: 
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Missing libraries:                                   ║
║     libicudata.so.70                                 ║
║     libicui18n.so.70                                 ║
║     libicuuc.so.70                                   ║
║     libvpx.so.7                                      ║
╚══════════════════════════════════════════════════════╝
    at validateDependenciesLinux (/home/rishu/Desktop/projects/forcesscraper/.venv/lib/python3.12/site-packages/playwright/driver/package/lib/server/registry/dependencies.js:216:9)
    at async Registry._validateHostRequirements (/home/rishu/Desktop/projects/forcesscraper/.venv/lib/python3.12/site-packages/playwright/driver/package/lib/server/registry/index.js:603:43)
    at async Registry._validateHostRequirementsForExecutableIfNeeded (/home/rishu/Desktop/projects/forcesscraper/.venv/lib/python3.12/site-packages/playwright/driver/package/lib/server/registry/index.js:701:7)
    at async Registry.validateHostRequirementsForExecutablesIfNeeded (/home/rishu/Desktop/projects/forcesscraper/.venv/lib/python3.12/site-packages/playwright/driver/package/lib/server/registry/index.js:690:43)
    at async t.<anonymous> (/home/rishu/Desktop/projects/forcesscraper/.venv/lib/python3.12/site-packages/playwright/driver/package/lib/cli/program.js:119:7)

╭─ ~/Desktop/projects/forcesscraper ▓▒░····························································░▒▓ ✔ │ forcesscraper Py │ at 13:03:04 ─╮
╰─ playwright uninstall                                                                                                                   ─╯
Removing unused browser at /home/rishu/.cache/ms-playwright/chromium-1117
Removing unused browser at /home/rishu/.cache/ms-playwright/ffmpeg-1009
Removing unused browser at /home/rishu/.cache/ms-playwright/firefox-1449
Removing unused browser at /home/rishu/.cache/ms-playwright/webkit-2003

╭─ ~/Desktop/projects/forcesscraper ▓▒░····························································░▒▓ ✔ │ forcesscraper Py │ at 13:03:17 ─╮
╰─ playwright install                                                                                                                     ─╯
Downloading Chromium 125.0.6422.26 (playwright build v1117) from https://playwright.azureedge.net/builds/chromium/1117/chromium-linux.zip
156.8 MiB [====================] 100% 0.0s
Chromium 125.0.6422.26 (playwright build v1117) downloaded to /home/rishu/.cache/ms-playwright/chromium-1117
Downloading FFMPEG playwright build v1009 from https://playwright.azureedge.net/builds/ffmpeg/1009/ffmpeg-linux.zip
2.6 MiB [====================] 100% 0.0s
FFMPEG playwright build v1009 downloaded to /home/rishu/.cache/ms-playwright/ffmpeg-1009
Downloading Firefox 125.0.1 (playwright build v1449) from https://playwright.azureedge.net/builds/firefox/1449/firefox-ubuntu-22.04.zip
85.7 MiB [====================] 100% 0.0s
Firefox 125.0.1 (playwright build v1449) downloaded to /home/rishu/.cache/ms-playwright/firefox-1449
Downloading Webkit 17.4 (playwright build v2003) from https://playwright.azureedge.net/builds/webkit/2003/webkit-ubuntu-22.04.zip
84.8 MiB [====================] 100% 0.0s
Webkit 17.4 (playwright build v2003) downloaded to /home/rishu/.cache/ms-playwright/webkit-2003
Playwright Host validation warning: 
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Missing libraries:                                   ║
║     libicudata.so.70                                 ║
║     libicui18n.so.70                                 ║
║     libicuuc.so.70                                   ║
║     libvpx.so.7                                      ║
╚══════════════════════════════════════════════════════╝
    at validateDependenciesLinux (/home/rishu/Desktop/projects/forcesscraper/.venv/lib/python3.12/site-packages/playwright/driver/package/lib/server/registry/dependencies.js:216:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Registry._validateHostRequirements (/home/rishu/Desktop/projects/forcesscraper/.venv/lib/python3.12/site-packages/playwright/driver/package/lib/server/registry/index.js:603:43)
    at async Registry._validateHostRequirementsForExecutableIfNeeded (/home/rishu/Desktop/projects/forcesscraper/.venv/lib/python3.12/site-packages/playwright/driver/package/lib/server/registry/index.js:701:7)
    at async Registry.validateHostRequirementsForExecutablesIfNeeded (/home/rishu/Desktop/projects/forcesscraper/.venv/lib/python3.12/site-packages/playwright/driver/package/lib/server/registry/index.js:690:43)
    at async t.<anonymous> (/home/rishu/Desktop/projects/forcesscraper/.venv/lib/python3.12/site-packages/playwright/driver/package/lib/cli/program.js:119:7)

Looking for those dependencies to install I tried with:

sudo apt install libvpx-dev
sudo apt install libicu-dev

Both install correctly but still it throws the error. I tried the whole process again with dependencies installed, but error still remained.

How can I install Playwright on Ubuntu 24.04?

Upvotes: 1

Views: 1483

Answers (1)

Jaromir Obr
Jaromir Obr

Reputation: 1

Please upgrade to Playwright 1.45 (https://github.com/microsoft/playwright/issues/30368)

Upvotes: 0

Related Questions