-
Notifications
You must be signed in to change notification settings - Fork 56
Installation
NOTE: Python 2.7.x is REQUIRED. BiblioPixel is NOT 3.x compatible!
With either installation method, it is recommended (but not necessary) to use virtualenv to isolate the installation.
The easiest way to acquire BiblioPixel is using pip. If you don't already have pip the easiest way is to download and run get-pip.py. Then install BiblioPixel as follows:
sudo pip install BiblioPixel
#sudo not needed on Windows
This will automatically install the entire package and make it available to import from anywhere in python. However, this will not get you any example or testing scripts. Download from GitHub to obtain all the extras.
Download the source package from GitHub and unzip the contents. Inside of the package directory run the command:
sudo python setup.py install
#sudo not needed on Windows
BiblioPixel should now be available to import in your python script.
The source package also includes the following utility scripts in the util directory:
- DeviceIDManager.py - Script for viewing and setting the device ID on the AllPixel
- AllPixelConfigure.py - Script for setting up the AllPixel configuration without first writing script code.
While not absolutely needed for all scenarios, the following packages may be required:
- pillow - Used for the image and DriverImageSequence modules.
- py-spidev - Used for DriverSPIBase, DriverLPD8806, and DriverWS2801. Provides direct SPI port access on the Raspberry Pi, BeagleBone Black, and similar. Not absolutely required but increases performance. Will not install on Windows or Mac OS! There is no SPI port available on such systems.
- pyserial - Used for DriverSerial to access serial (COM) ports.
These packages can be installed via:
sudo pip install pillow
sudo pip install spidev
sudo pip install pyserial
#sudo not needed on Windows
Or, to install everything at once, from the BiblioPixel package directory run:
sudo pip install -r requirements.txt
#sudo not needed on Windows
Note 1: Many Linux systems will already have pyserial installed! But it is likely not the correct version. Upgrade to the latest version with:
sudo pip install pyserial --upgrade
Note 2: It is always possible to install these modules either direct from source or with installer packages. If you already had any of these libraries installed with pip and then install via another method, or vice-versa, then both will be installed and python may not pick up the correct version. If upgrading the module, either uninstall the original first or use the same method used to install it in the first place. Modules that came with python can be considered to have been installed using pip.
On Windows, pillow may require some advanced development tools to be installed. If you are having trouble installing, try these pre-compiled binaries.
If running the above command under Windows or Mac OS, the spidev installation will fail. This is okay, as there are no SPI ports on such systems anyways.
DriverVisualizer requires tkinter which is pre-installed with python in most situations, but does not come pre-installed on some versions of Linux. If you see the error:
ImportError: No module named _tkinter, please install the python-tk package
install tkinter with the following command:
sudo apt-get install python-tk