Installing SimpleCV with Python 2.7.5 in Virtualenv in Ubuntu 13.10

1. sudo apt-get build-dep python-opencv
2. sudo apt-get install python-opencv
3. sudo apt-get install python-setuptools python-pip gfortran g++ liblapack-dev libsdl1.2-dev libsmpeg-dev mercurial
4. Get the paths for and by applying dpkg -L python-opencv
5. virtualenv simplecv_venv
cd simplecv_venv
ln -s /usr/lib/pyshared/python2.7/ lib/python2.7/site-packages/
ln -s /usr/share/pyshared/ lib/python2.7/site-packages/
sudo ./bin/pip install
sudo ./bin/pip install cython
sudo ./bin/pip install scipy
sudo ./bin/pip install PIL
sudo ./bin/pip install ipython
mkdir src
wget -O src/pygame.tar.gz
cd src
tar zxvf pygame.tar.gz
cd ..
sudo ./bin/python src/pygame-pygame-6625feb3fc7f/ -setuptools install
sudo ./bin/pip install
6. Test installation with the following webcam capture code, you’ll need to install the following module:
sudo bin/pip install svgwrite
7. Activate simplecv virtual environment:
$ source bin/activate
8. Open ipython and run the following code:
In [1]: run

from SimpleCV import Camera, Display, Image
# Initialize the camera
cam = Camera()
# Initialize the display
display = Display()
# Snap a picture using the camera
img = cam.getImage()
# Show the picture on the screen

Exit ipython to stop the code running.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s