facebook_page_scraper icon indicating copy to clipboard operation
facebook_page_scraper copied to clipboard

Could not get version for Chrome with this command: google-chrome --version || google-chrome-stable --version

Open andrea-gariboldi opened this issue 1 year ago • 5 comments

Hello, the code gives me the following error: "Could not get version for Chrome with this command: google-chrome --version || google-chrome-stable --version". Currently I'm trying to run the code on DeepNote. Can you please help me? Screen Shot 2023-04-26 at 10 39 21

andrea-gariboldi avatar Apr 26 '23 09:04 andrea-gariboldi

It looks like Chrome is not installed on your deep note instance.

Try adding the following to the init cell:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb -Y

This will install the latest google-chrome version to your notebook before running the script.

The whole Init cell should look like this:

%%bash
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb -Y
# If your project has a 'requirements.txt' file, we'll install it here apart from blacklisted packages that interfere with Deepnote (see above).
if test -f requirements.txt
  then
    sed -i '/jedi/d;/jupyter/d;' ./requirements.txt
    pip install -r ./requirements.txt
  else echo "There's no requirements.txt, so nothing to install. This is the case with most projects."
fi

I just tested it with your excample code and was successfull. If you have any further questions, feel free to ask :)

SchmueI avatar May 03 '23 15:05 SchmueI

Thank for your reply. But I'm still getting an error. Screen Shot 2023-05-03 at 21 49 26 The download with wget seem to work (I can see the dowloaded file in the project's files) but the error is probably provoked by the sudo apt install ./google-chrome-stable_current_amd64.deb -Y line. Screen Shot 2023-05-03 at 21 53 29 Even removing -Y gives me errors. Screen Shot 2023-05-03 at 21 54 54 Thanks for the help.

andrea-gariboldi avatar May 03 '23 19:05 andrea-gariboldi

Try adding sudo apt update to the init cell:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt update
sudo apt install ./google-chrome-stable_current_amd64.deb -Y

If this doesnt work, try running the commands from the terminal shell

The whole Init cell should look like this:

%%bash
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt update
sudo apt install ./google-chrome-stable_current_amd64.deb -Y
# If your project has a 'requirements.txt' file, we'll install it here apart from blacklisted packages that interfere with Deepnote (see above).
if test -f requirements.txt
   then
     sed -i '/jedi/d;/jupyter/d;' ./requirements.txt
     pip install -r ./requirements.txt
   else echo "There's no requirements.txt, so nothing to install. This is the case with most projects."
 fi

Greetings Schmuel

Edit: also, pls share code with code blocks, not screenshots :)

SchmueI avatar May 03 '23 20:05 SchmueI

Thank you man, now it's working. One last question.... Do you know why it doesn't get all the reactions? It seems to get only the two higher values

andrea-gariboldi avatar May 04 '23 08:05 andrea-gariboldi

This is a known Issue. See #48 You might want to close this issue now.

SchmueI avatar May 04 '23 08:05 SchmueI