I installed a new Ubuntu server 18.04.1 LTS on Vmware Workstation 15
It comes with Python 3.6.7
python3 --version
Python 3.6.7
No pip installed, so:
sudo apt install python3-pip
pip3 --version
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
pip3 install instapy
""" Quickstart script for InstaPy usage """
# imports
from instapy import InstaPy
from instapy import smart_run
# login credentials
insta_username = '' # <- enter username here
insta_password = '' # <- enter password here
# get an InstaPy session!
# set headless_browser=True to run InstaPy in the background
session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=False)
with smart_run(session):
""" Activity flow """
# general settings
session.set_relationship_bounds(enabled=True,
delimit_by_numbers=True,
max_followers=4590,
min_followers=45,
min_following=77)
session.set_dont_include(["friend1", "friend2", "friend3"])
session.set_dont_like(["pizza", "#store"])
# activity
session.like_by_tags(["natgeo"], amount=10)
python3 quickstart.py
Got this error:
INFO [2019-02-06 11:57:28] [instauser] Using built in instapy-chromedriver executable (version 2.44)
ERROR [2019-02-06 11:57:29] [instauser] Message: Service /home/user/.local/lib/python3.6/site-packages/instapy_chromedriver/chromedriver_linux64 unexpectedly exited. Status code was: 127
Traceback (most recent call last):
File "/home/user/.local/lib/python3.6/site-packages/instapy/browser.py", line 123, in set_selenium_local_session
chrome_options=chrome_options)
File "/home/user/.local/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/home/user/.local/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 98, in start
self.assert_process_still_running()
File "/home/user/.local/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running
% (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service /home/user/.local/lib/python3.6/site-packages/instapy_chromedriver/chromedriver_linux64 unexpectedly exited. Status code was: 127
Traceback (most recent call last):
File "quickstart.py", line 14, in <module>
headless_browser=True)
File "/home/user/.local/lib/python3.6/site-packages/instapy/instapy.py", line 276, in __init__
self.set_selenium_local_session()
File "/home/user/.local/lib/python3.6/site-packages/instapy/instapy.py", line 328, in set_selenium_local_session
raise InstaPyError(err_msg)
instapy.exceptions.InstaPyError: ensure chromedriver is installed at /home/user/.local/lib/python3.6/site-packages/instapy_chromedriver/chromedriver_linux64
ls -la .local/lib/python3.6/site-packages/instapy_chromedriver
total 34460
drwxrwxr-x 3 user user 4096 Feb 6 10:53 .
drwx------ 53 user user 4096 Feb 6 10:53 ..
-rwxrwxr-x 1 user user 11808880 Feb 6 11:54 chromedriver_linux64
-rwxrwxr-x 1 user user 14780812 Feb 6 11:54 chromedriver_mac64
-rwxrwxr-x 1 user user 8674304 Feb 6 11:54 chromedriver_win32.exe
-rw-rw-r-- 1 user user 940 Feb 6 11:54 `__init__.py`
drwxrwxr-x 2 user user 4096 Feb 6 10:53 __pycache__
What version is chrome? Do you even have it installed?
~ive got the same on my second server~
never mind
apt install chromedriver
fixed it (running on Debian 9.0)
Is chrome installed?
Exactly, chrome is often not preinstalled on servers.
on ubuntu its: sudo apt install chromium-chromedriver
Thanks @Tr1pke solved with:
sudo apt install chromium-chromedriver
Most helpful comment
on ubuntu its: sudo apt install chromium-chromedriver