python-gphoto2 is a comprehensive Python interface (or binding) to libgphoto2. This example show how to install python-gphoto2 on Raspberry Pi 2/Raspbian Jessie (2015-11-21 release), work with with libgphoto2 2.5.9.
Before install python-gphoto2, you have to install libgphoto2 first. Refer "Install gphoto2 and libgphoto2 version 2.5.9 on Raspberry Pi 2/Raspbian Jessie 2015-11-21".
- Install python-dev
$ sudo apt-get install python-dev
- install python-gphoto2 with pip
$ sudo pip install gphoto2
If you installed with pip the example files should be in /usr/share/python-gphoto2/examples or /usr/local/share/python-gphoto2/examples or somewhere similar. Otherwise they are in the examples sub-directory of your working directory. In Raspbian Jessie, it should be in /usr/local/share/python-gphoto2/examples.
To test the installed python-gphoto2, connect supported camera (D7000 in my case) to Raspberry Pi 2 via USB, power on the camera. run the script:
$ python camera-summary.py
$ python capture-image.py
No comments:
Post a Comment