Set up of Chrome packages in streamlit

I deployed an application on streamlit.
I would need to install the following packages: google-chrome-stable
chromedriver
I have the following error: E: Unable to locate package google-chrome-stable

E: Package ‘chromedriver’ has no installation candidate

[23:13:56] :exclamation: installer returned a non-zero exit code

[23:13:56] :exclamation: Error during processing dependencies! Please fix the error and push an update, or try restarting the app.

[23:15:31] :exclamation: Streamlit server consistently failed status checks

[23:15:31] :exclamation: Please fix the errors, push an update to the git repo, or reboot the app.

Hi @Jean-Jacques_Ohana

It seems you’re installing a Ubuntu package which can be specified in packages.txt

Please see the following for more in-depth information:

Hope this helps!

Hello,

Many thanks for your answer.

I experience a specific issue with chromedriver. The code that has an error is the following:

    options = webdriver.ChromeOptions()
    options.add_argument("--headless")
    options.add_argument("--no-sandbox")
    options.add_argument("--disable-dev-shm-usage")
    options.add_argument("--disable-gpu")

    # Start Chrome and open the webpage
    with webdriver.Chrome(options=options) as driver:
        driver.get(url)
        driver.implicitly_wait(10)
        result = driver.execute_cdp_cmd("Page.printToPDF", {"landscape": False})

Error converting https://www.inc.com/soren-kaplan/artificial-intelligence-ai-will-disrupt-consulting-industry.html to PDF: Message: Service /home/appuser/.cache/selenium/chromedriver/linux64/117.0.5938.149/chromedriver unexpectedly exited. Status code was: 127

However, I completed
requirements.txt
selenium
seleniumbase

packages.txt
chromium
chromium-driver

It works on my own machine but not on the server and I cannot figure out why.

Many thanks for your help.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.