Raspberry Pi Lab

Tag: scripts

Getting Python Scripts and Libraries

by on Dec.30, 2013, under Code

python-logo-transparentI’ve been doing the basic setup stuff, but I want to build stuff.  So…

First we need to make sure the program git is installed and is the latest version.  If you installed the Occidentalis stock image, git is already installed.  If you used the Raspbian stock image, git may not be pre-installed.  In either case we can, very easily make certain git is installed and is the latest version

sudo apt-get update
sudo apt-get install git

If it isn’t installed, it will be.  If it was installed but not the latest version, it will be replaced. If it was installed and already the latest version, nothing will happen.

Next, we need to obtain the boat load of Python scripts and libraries made available by AdaFruit.

git clone http://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code.git
cd Adafruit-Raspberry-Pi-Python-Code
ls

This will download a collection of scripts and libraries  that will be useful in attaching electronics to our RPi.

Then we need the Python library for actually controlling the GPIO on the RPi.  These commands will install the packages or update the existing packages (if needed).

sudo apt-get install python-dev
sudo apt-get install python-rpi.gpio

 

 

 

 

Leave a Comment :, , , , , more...

Archives

All entries, chronologically...

Our Partners

Please take a minute to visit our partners

Looking for something?

Search the Site

If you can't find what you are looking for, please leave a comment somewhere, subscribe to our feed and hopefully your question will be answered shortly, so please visit again!