Skip to content

Instantly share code, notes, and snippets.

@itisrazza
Last active September 25, 2018 22:14
Show Gist options
  • Save itisrazza/bad1b2ccfcaaecc33d260febe933243e to your computer and use it in GitHub Desktop.
Save itisrazza/bad1b2ccfcaaecc33d260febe933243e to your computer and use it in GitHub Desktop.
Install SimpleCV on Ubuntu 16.04
#!/bin/bash
#
# Installation script for SimpleCV
# on Ubuntu 16.04 and derivatives
#
# Created by Raresh Nistor
#
# NOTE: This is my first bash script,
# it's not going to have many safeguards
#
# Break the script in half if it breaks
set -e
# Check if the user ran the script as an administrator
if [ "$EUID" -ne 0 ]
# And attempt to escalate it provided `sudo` is installed
then echo "The program is not being run as root. Attempting elevation..."
sudo $0
# Exit to prevent bleeding back
exit
fi
# Install dependacies (found in the repo)
echo "Installing dependancies..."
echo " Installing python plugins available from the Ubuntu repo..."
apt-get install ipython python-opencv python-scipy python-numpy python-pygame python-setuptools python-pip
echo
# Install python-support (as it is no longer included in the Ubuntu repos)
echo " Installing python-support from alternate source..."
echo " Downloading python-support..."
wget http://launchpadlibrarian.net/109052632/python-support_1.0.15_all.deb
echo " Installing python-support..."
dpkg -i python-support_1.0.15_all.deb
echo " Cleaning up..."
rm python-support_1.0.15_all.deb
echo
# Install SimpleCV
echo "Installing SimpleCV..."
echo " Downloading SimpleCV from SourceForge..."
wget https://sourceforge.net/projects/simplecv/files/1.3/SimpleCV-1.3.deb
echo " Installing the SimpleCV package..."
dpkg -i SimpleCV-1.3.deb
echo " Cleaning up..."
rm SimpleCV-1.3.deb
echo
# Possibly fix any breakages
echo "Final cleanup..."
apt-get -f install
echo
# Thanks
echo "Thank you for using my SimpleCV installer. Please make sure it is properly installed."
echo "as this install is rough around the edges."
@laisan86
Copy link

Hey! Nice work. But I found you seem missed one package which SimpleCV needs ==> python-pil ...

Would you please check it out? Maybe I was wrong.

@Dagorath
Copy link

There is a typo in line 49. It currently reads:
rem SimpleCV-1.3.deb

It should read:
rm SimpleCV-1.3.deb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment