'Trouble running InstaPy quickstart

I was able to install InstaPy on an Oracle Ampere Compute VM (ARM processors) running Ubuntu 20.04 LTS. When I try running quickstart.py, it showed me the following errors:

/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.8) or chardet (3.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
InstaPy Version: 0.6.15
 ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.
Workspace in use: "/home/ubuntu/InstaPy"
Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 71, in start
    self.process = subprocess.Popen(cmd, env=self.env,
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/geckodriver'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "quickstart.py", line 5, in <module>
    session = InstaPy(username='XXX', password='XXX', headless_browser=True)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/instapy/instapy.py", line 327, in __init__
    self.browser, err_msg = set_selenium_local_session(
  File "/home/ubuntu/.local/lib/python3.8/site-packages/instapy/browser.py", line 123, in set_selenium_local_session
    browser = webdriver.Firefox(
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
    self.service.start()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 81, in start
    raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

I had to install an older version of the geckodriver meant for ARM processors and /usr/local/bin/geckodriver is executable and present in PATH. How do I resolve this?

EDIT: This is what it shows for echo $PATH

ubuntu@oracleampere:~$ echo $PATH
/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/bin/geckodriver
ubuntu@oracleampere:~$ geckodriver
-bash: /usr/local/bin/geckodriver: No such file or directory
ubuntu@oracleampere:~$


Solution 1:[1]

I finally got this to work but not on the Oracle Ampere Compute VMs. Apparently it does not want to work with ARM processors. I setup a standard ubuntu box running on Intel processors and that worked.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 electrophile