0

I've spent about 6 hours trying to install Selenium. I think my various errors stem from version compatibility or lacking prerequisite packages. I am using Debian 9 on a OpenVZ VPS from servercheap.net. This VPS doesn't come with many packages preinstalled, so I have to install things like python manually. Can someone write a step-by-step process for installing Python3 selenium on a fresh rebuild of Debian 9? Please specify which webdriver and version numbers too.

As for the errors I've gotten, here are a few:

Message: 'geckodriver' executable needs to be in PATH
Message: invalid argument: can't kill an exited process
Message: Process unexpectedly closed with status 1
Message: Service chromedriver unexpectedly exited. Status code was: 127

I want to be able to run the following Python3 script without error:

from selenium import webdriver
browser = webdriver.Firefox() #or webdriver.Chrome()
Max Vollmer
  • 8,412
  • 9
  • 28
  • 43
Rontron
  • 3,963
  • 7
  • 26
  • 44
  • The duplicate question does not answer my question. I've tried their solution, it does not work. It leads to the afformentioned chrome crashes "can't kill an exited process". – Rontron Nov 19 '19 at 13:53
  • Hi! I rolled back your edit, because answers do not belong in questions. Since your question has a duplicate, you can post your answer there. *(If you think the duplicate is wrong, then explain why in a comment and vote to reopen, and wait until enough people have voted to reopen, before posting your answer here.)* – Max Vollmer Dec 06 '19 at 12:35
  • I will just delete and repost – Rontron Dec 06 '19 at 16:28
  • I strongly advice against that. Not only do you risk the repost being closed as dupe again, you also risk getting an automatic question ban. The best approach would be to edit your question and clarify how it is different from the duplicate. The duplicate having unsatisfactory answers is not a valid reason for a new question. – Max Vollmer Dec 06 '19 at 17:00

1 Answers1

-2

Following the example from this answer, you just need to make sure that the program knows where the executable is located

from selenium import webdriver
browser = webdriver.Firefox(r'your\path\geckodriver.exe') #or webdriver.Chrome()
Nate
  • 1