NOTE: If you add an empty file named ssh to the boot directory, ssh will be enabled when you first start your RPi (more info on the official website - section 3 - here). If you do this, you can connect your RPi via ethernet, ssh in (once you have your ip) and skip right to the update step below (step 7). If you do not want to do this, follow the initial setup instructions to connect peripherals below.
- connect rpi3 to monitor via HDMI
- connect internet via cat5
- insert usb for wireless keyboard and mouse (if using)
- plug in rpi3 with sd card preloaded with NOOBs
- select country & install Raspbian
- open terminal --> sudo raspi-config -->interfacing options --> SSH -->enable (allows ssh connection from MacBook); then navigate to VNC --> enable (allows GUI access)
- sudo apt-get update && sudo apt-get upgrade
- mkdir Projects
- cd Projects
- git clone https://github.com/timgrossmann/InstaPy.git
- cd InstaPy
- sudo pip install . (encountered some errors and resulting 3 commands below (13-15), all may not be necessary)
- sudo apt-get build-dep python-imaging
- sudo apt-get install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev
- sudo pip install .
- sudo apt-get install tightvncserver (to view GUI from MacBook)
This assumes you're using the latest version of raspbian (stretch). Note that this works best running headless.
- Switch to the root user
sudo su
- Update apt source lists
echo "deb http://security.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list
- Update
apt-get update
- Install the browser
apt-get install chromium-browser
- Install the driver
apt-get install chromedriver
- Move the driver into the InstaPy/assets directory
mv /usr/bin/chromedriver /path/to/InstaPy/assets/chromedriver
- nano instapy/settings.py
- change "chromedriver_min_version = 2.36" to "chromedriver_min_version = 2.33" & save file
The combination of the versions of chromium-browser and chromdriver is important. This combination is currently working
- Chromium 65.0.3325.181 Built on Raspbian , running on Raspbian 9.4
- ChromeDriver 2.36 (a81166ad79e68fbfe7cf5ba243192d6412e26b37)
Remove any versions of Firefox as it will conflict with the correct one installed below:
- sudo apt-get remove firefox-esr
- sudo apt-get remove iceweasel
- sudo apt-get remove firefox
found the following commands to install Firefox here; https://www.q4os.org/forum/viewtopic.php?id=912
- echo 'deb http://q4os.org/qextrepo q4os-rpi-firefox-cn main' | sudo tee /etc/apt/sources.list.d/qextrepo.list
- wget -nv -O- http://q4os.org/qextrepo/q4a-q4os.gpg.pub | sudo apt-key add -
- sudo apt-get update
- sudo apt-get install firefox
Update GeckoDriver if needed. Instructions at the end of this document.
Firefox is not currently working correctly on Pi 2, to install a working version the following commands should be used:
Pi2.2 sudo dpkg -i firefox_49.0+build4-0ubuntu0.14.04.1_armhf.deb
Encountered some errors when trying to run the quickstart.py and ran the next 3 commands (all may not be necessary)
- sudo pip install future
- sudo apt-get install xvfb
- sudo pip install pyvirtualdisplay
- sudo reboot (may not be required, but no harm)
Assuming you've modified quickstart.py to your liking and added your Instagram login to instapy.py
- sudo xvfb-run python quickstart.py
I installed TMUX to help run this headless, so that I can disconnect from the session and have the program continue to run on the rpi3
-
sudo apt-get install tmux (more info found here: https://github.com/tmux/tmux)
-
If using firefox, follow the example seen in
examples\firefoxExample.py
to set the default browser as Firefox
New releases can be found in https://github.com/mozilla/geckodriver/releases
- wget https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-arm7hf.tar.gz
- tar -xvzf geckodriver-v*
- chmod +x geckodriver
- sudo cp geckodriver /usr/local/bin/
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install chromium-browser python-pip git
git clone https://github.com/timgrossmann/InstaPy.git instapy
- in the instapy folder:
pip install .
- in the assets folder:
wget https://github.com/electron/electron/releases/download/v3.0.0-beta.5/chromedriver-v3.0.0-beta.5-linux-armv7l.zip
- also in the assets folder:
unzip chromedriver-v3.0.0-beta.5-linux-armv7l.zip
- 🎉