Skip to content

Third Party Libraries

Tammy Liu edited this page Nov 3, 2015 · 5 revisions

Table of Contents

Testing

When installing, sometimes trying to run python main.py to see if everything works can get really annoying.
In those cases run Python either in the console or through terminal (just type python) then try to import dependencies:
import serial
import pygtk
import numpy
import cv2

If terminal doesn't yell at you after all this, then you're good to go!
If one of these aren't importing, and you can find the files in /usr/local/lib/python2.7/site-packages(or wherever your module directory is), then do the following:
1. Open terminal
2. Type open .bash_profile
3. Check your PYTHONPATH, and if it exists. If it does check if it's pointing to that directory and skip to step 5. If not, got to the next step.
4. Copy this into it:

 PYTHONPATH="$PATH:/usr/local/lib/python2.7/site-packages"
 export PYTHONPATH

5. Try again

Third Party Software

pyserial

Installation instructions: http://pyserial.sourceforge.net/pyserial.html#installation

Mac: Download .tar.gz from here (https://pypi.python.org/pypi/pyserial), cd to the file and type in terminal:

pygtk

When choosing packages to install, include Glade: http://www.pygtk.org/downloads.html

Mac: Download and install package from here: http://sourceforge.net/projects/zero-install/files/PyGTK/2.24.0/

NumPy

Ensure that you get the most recent version of NumPy for compatibility with OpenCV.

http://www.scipy.org/scipylib/download.html

OpenCV-2.X.X

API Documentation: http://docs.opencv.org/

Installation Instructions: http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html

Mac instructions: https://jjyap.wordpress.com/2014/05/24/installing-opencv-2-4-9-on-mac-osx-with-python-support/

GStreamer-WinBuilds-GPL-x86-Beta04-0.10.7 and GStreamer-WinBuilds-SDK-GPL-x86-Beta04-0.10.7

    • NOTE: Gstreamer is not necessary for the current build.**
  1. To install .NET 2.0 (if required), do so in Control Panel -> Programs and Features -> Turn Windows features on or off
  2. To configure GST for Python 2.7 instead of Python 2.6 (the default), followed instructions found at http://stackoverflow.com/questions/6907473/cannot-import-gst-in-python
{%GSTREAMER%} is usually something like C:\Program Files\OSSBuild\GStreamer

Go to {%GSTREAMER%}\v0.10.7\sdk\bindings\python\v2.7\lib and copy gstreamer-0.10 and site-packages to {%GSTREAMER%}\v0.10.7\lib, replacing any existing files.

Delete the file {%GSTREAMER%}\v0.10.7\lib\gstreamer-0.10\libgstpython-v2.6.dll