SolvedInstaPy Definetly not working on Raspberry Pi (3B+) - *Updated Instructions*

Ok, I got InstaPy running multiples times before the big update, even with some small issues with chromedriver. But recent update broke everything on RPi. I've reinstaled clean raspbian, this time Lite only with CLI and got nothing.

Followed instruction step by step, but it's impossible to make it work. There are some issues on the How To doc available to RPi

  1. No assets folder, so is not clearly if it must be created under InstaPy dir from git or wherever
  2. No clues about creating a venv and how this supports the current installation (why is this necesary? *Personal doubt
  3. It's possible to install InstaPy only using pip install instapy on RPi??

Current Behavior

After installing using How To Instructions and after python3 -m pip install --user . command, used this command under InstaPy dir, on venv37 active:

python --username myusername --password mypassword

to test the initation of script. The result was this:

Traceback (most recent call last): File "", line 4, in <module> from instapy import InstaPy File "/home/pi/Projects/InstaPy/instapy/", line 3, in <module> from .instapy import InstaPy File "/home/pi/Projects/InstaPy/instapy/", line 11, in <module> import requests ModuleNotFoundError: No module named 'requests'

Then used:
python3 --username myusername --password mypassword

And the result was:

._.  ._.  ._.  ._.  ._.  ._.  ._.  ._. 
Workspace in use: "/home/pi/InstaPy"

 ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._.  ._. 
INFO [2019-02-20 20:39:12] [myusername]  Using built in instapy-chromedriver executable (version 2.44)
Traceback (most recent call last):
  File "", line 14, in <module>
  File "/home/pi/Projects/InstaPy/instapy/", line 279, in __init__
  File "/home/pi/Projects/InstaPy/instapy/", line 331, in set_selenium_local_session
  File "/home/pi/Projects/InstaPy/instapy/", line 135, in set_selenium_local_session
  File "/home/pi/.local/lib/python3.7/site-packages/selenium/webdriver/chrome/", line 73, in __init__
  File "/home/pi/.local/lib/python3.7/site-packages/selenium/webdriver/common/", line 76, in start
  File "/usr/local/opt/python-3.7.0/lib/python3.7/", line 756, in __init__
    restore_signals, start_new_session)
  File "/usr/local/opt/python-3.7.0/lib/python3.7/", line 1499, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/home/pi/.local/lib/python3.7/site-packages/instapy_chromedriver/chromedriver_linux64'

Possible Solution (optional)

By now, I will have to use my dual boot ubuntu to use the InstaPy, would be great a bit of help for all the users of RPi.

44 Answers

✔️Accepted Answer

clean reinstall of raspbian on a rp3+

sudo apt-get update
sudo apt-get upgrade
pip3 install instapy
pip3 uninstall instapy-chromedriver
pip3 install instapy-chromedriver==2.36.post0
sudo apt-get install chromium-browser (raspbian by default ships with chromium 60, installing new version gets you 65)

that was basically it.

But this will only work wirh the "normal" rasbian.
Is pip3 working on Stretch Lite?

Ok, I made it. On a fresh and clean install of Raspbian Stretch Lite. These are all the steps I followed to make the script start, from CLI via SSH. My RPi is an Raspberry Pi 3B+


sudo apt-get update && sudo apt-get -y upgrade
sudo apt-get install python3-pip
sudo pip3 install instapy
sudo pip3 uninstall instapy-chromedriver
sudo pip3 install instapy-chromedriver==2.36.post0
sudo apt-get install chromium-browser
sudo reboot


Then I created a dir to keep my scripts

mkdir scripts
cd scripts

Then writed down (or copy & paste from, just changed headless_browser to True.

(pasted previously modified quickstart and saved)


If you want to use nogui=True, I recomended you to install xvfb

sudo apt-get install xvfb

Runing InstaPy

And finally started the script

pyhton3 -u XXXXX -p XXXXX

Then script started...
The login was registered by Instagram (received notification by email) and actions worked flawless.

So, I think this is the correct and only way to install InstaPy on RPi 3B. By now everyone trying to install it, should avoid the "How To Raspberry" instructions and follow this.

Other Answers:

@TarekJ03 tried with chromium-chromedriver, but InstaPy warned about it being 2.35 but needed 2.36+, so I ditched it. Will try again with the one you provided, thanks. I will update if it works.

EDIT: IT WORKS! Thank you @andifds and @TarekJ03 !

If anyone wants to use Raspberry Pi Zero 1.3 or Raspberry Pi Zero W (tested on Zero 1.3 with fresh Stretch lite):

sudo apt-get update && sudo apt-get -y upgrade
sudo apt-get install -y python3-pip
sudo pip3 install instapy
sudo apt-get install -y chromium-browser
sudo apt-get install -y chromium-chromedriver
sudo pip3 uninstall -y instapy-chromedriver
sudo pip3 install instapy-chromedriver==2.36.post0
sudo cp /usr/lib/chromium-browser/chromedriver /usr/local/lib/python3.5/dist-packages/instapy_chromedriver/chromedriver
sudo apt-get install -y xvfb

(Find line 'chromedriver_min_version' and set it to 2.35):
sudo nano /usr/local/lib/python3.5/dist-packages/instapy/

(Not necessary, but restart can be made) 
sudo reboot

After that you can use your python program. In InstaPy() set headless_browser = True and nogui = True - run the program with sudo python3 .

chmod wasn't necessary for me, but:

cd /usr/local/lib/python3.5/dist-packages/instapy_chromedriver/
sudo chmod 755 chromedriver 
sudo chmod +x chromedriver

Zero is pretty slow though.

Edit2: Fixed few things, now it works.

Related Issues:

InstaPy Login A/B test detected! Trying another string...
To anybody still having this issue on 6.1 Its caused by a typo in the file Line 159...
InstaPy ERROR Message: unknown error: DevToolsActivePort file doesn't exist
uncomment line chrome_options.add_argument('--no-sandbox') in your should fix your proble...
InstaPy Not logging in anymore
You can just set the Switch language to False In make self.switch_language = False ...
InstaPy Instagram Server Status: error
Solution 1: Add want_check_browser=False Solution 2: Edit the file: Find and comment t...
InstaPy Selenium Unable to locate element
File: Solution: Before: Hi everyone ...
InstaPy like element has changed
Possible Changes in @sionking could this work instead? any fix ? ...
InstaPy Raspberry Pi 3+ -> Error occured while deleting cookies
@JoeFertig thanks again! If it comes to that I will definitely check out some other microcomputers F...
InstaPy Install InstaPy on a Raspberry
finally made it!! i reversed the tutorial
InstaPy Definetly not working on Raspberry Pi (3B+) - *Updated Instructions*
clean reinstall of raspbian on a rp3+ sudo apt-get update sudo apt-get upgrade pip3 install instapy ...
InstaPy cant get user followers
In Temporary replace with IT WORKS! Use this temporarily while wait for the officia...
InstaPy TypeError: window.insta_data is undefined
Today Bot start w/o any problem after some likes action the session end with this report: On the gec...
InstaPy Hide Selenium Extension: Error
Okay: I digged into it a little bit The problem seems to be with the arrive function within the fire...
InstaPy [FIX]IG Change Login Class Element - Cannot Creating Cookies or New Login Issue When Deleting Cookies
Please read New update : ...
InstaPy Unfollow loop error: Message: unknown error: Cannot read property 'activity_counts' of undefined
Alright @tompicca Do this modification to get a total solution INFO [2018-08-19 11:27:42] [xxx] --> ...
InstaPy Follow likers function can't fetch likers properly
Hi @opexa I saw your problem while reading @timgrossmann's thread Getting likers from user: targetus...
InstaPy BUG or Instagram issue -- Super Strange behavior on Likes recently
@SDKFJ55LDK8K2 I'm just curious how did you get those numbers from ? For the majority of accounts th...
InstaPy Another XPath Error
@JodyHicks thanks for the hint that actually did the trick Hi everyone I have come across another XP...
puppeteer Failed to download Chromium r536395! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
Solves the issue to me. Steps to reproduce Tell us about your environment: Puppeteer version: Not in...
puppeteer How to get text from a element ?
You can try this: or this: This might be a Obvious question but ...
puppeteer Chrome Headless doesn't launch on Debian
for the dockerisers amongst us - i've launched successfully with this setup: Running this example co...
vagrant vagrant box update - Fails with 404 Not Found error
A workarround to add in your Vagrantfile: Vagrant version Host operating system Ubuntu 16.04.3 LTS G...
puppeteer Ubuntu 18.04 Headless Chrome Node API - Puppeteer - Installation Guide
Based on You only have to run the following command in Ubu...
vagrant vagrant --help displays a rubygems error
To fix this error: Vagrant version Host operating system Expected behavior vagrant and vagrant --hel...
puppeteer how to check if selector exists or is present ?
As a variant: how to check if selector exists or is present waiting for (x) time or when the page is...
puppeteer Installation fails on Apple Silicon / M1
The solution for me using Chromium from Homebrew was: You will get a security warning ...
puppeteer npm install -g puppeteer fails
This command ended up working for me in case anyone lands here by googling the error: sudo npm insta...
phantomjs QXcbConnection: Could not connect to display
can confirm export QT_QPA_PLATFORM=offscreen before selenium scripts work's well. ...
puppeteer can't run puppeteer in centos7
@zhuyingda 's notes above will allow you to run puppeteer with --no-sandbox Server Info: CUP: Intel(...
puppeteer Headless mode is not working
I had the same issue I then added await page.screenshot(...) to see what's going on in headless mode...
vagrant Vagrant up forces shutdown of VM
Update: Please upgrade vagrant to 1.9.5 as it's released The version contains fix for this issue ...
puppeteer Run from Electron
For me the solution was a combination of the approach of @qathom and @tpkn: But in my case the array...
fastlane Connection reset by peer
Thanks for the fix! got me back in business New Issue Checklist Updated fastlane to the latest versi...
puppeteer How to scrape an element
The following should work: Hi I think this is an obvious question but still I cannot figure out how ...
puppeteer] Running as root without --no-sandbox is not supported
@ststeiger so which are the launch options? Like Or do I need to add args: ['--no-sandbox' '--disabl...
puppeteer Page.setContent should wait for resources to be loaded
Meanwhile a good workaround for page.setContent that waits for all the resources to load: ...
vagrant 1.8.7 fails to download or update boxes
I just sudo rm -rf /opt/vagrant/embedded/bin/curl and it works now It's looked like vagrant can fall...
puppeteer Request: browser.currentPage() or similar way to access Pages
To get the first page of the current browser I was playing around with Puppeteer today and I found o...
puppeteer Error: Failed to launch chrome! spawn /app/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome ENOENT
@arapocket Thanks for commenting—I forgot to follow up after I found a solution It's been a couple o...
vagrant VBoxManage.exe: error: Invalid NIC number
Confirm the problem It is reproduced with Windows10/Vagrant 1.8.3/VirtualBox 5.0.20 and hashicorp/pr...
puppeteer Error: Failed to launch the browser process! spawn chrome.exe ENOENT
For me on Linux the only way to resolve is by installing some dependencies: Source ...
puppeteer EventEmitter memory leak detected. 11 exit listeners added
@selfrefactor ah indeed you launch chrome processes in parallel Every chrome instance adds a listene...
vagrant Openssl error on Vagrant 1.8.7 / MacOs Sierra
The workaround to link the existing openssl as proposed in GH-7747 seems to work as well sudo ln -sf...
puppeteer Collect element attributes from selector
i think this would do it And once #625 is implemented this will be.. Beginner user here Started play...
fastlane firebase_app_distribution plugin doesn't work in macOS Catalina
Looks like files in firebase_app_distribution plugin have incorrect permissions 640 by default ...
puppeteer Puppeteer Won't Click on Element
In my case I'm able to use this reliably: page.$eval(selectorStr elem =>; ...
puppeteer Execution context was destroyed, most likely because of a navigation
@THE-GAME-YOU-LOST I see The right thing to do would be to await navigation caused by ...
puppeteer does not work with an input selector
I'm running into the same issue Strangely if I use page.evaluate it does work For example: I'd be cu...
puppeteer Different behavior between { headless: false } and { headless: true }
As mentioned in the article @Garbee posted the headless version does not have languages set on the n...
fastlane fastlane gym produces error: method `to_plist' not defined in Array
Alright New Issue Checklist Updated fastlane to the latest version I read the Contribution Guideline...