Closed greiginsydney closed 2 years ago
Why are you using apt to install libgphoto2 after you've installed your local build of it? This might be giving you two installations in different places which could confuse the Python build. The import error might be because at runtime Python is linking to a different version of libgphoto2 than the one whose header files python-gphoto2 was built with.
That would be purely a misunderstanding as to what all the various components do.
I'd do a rebuild without adding libgphoto2-6 & libgphoto2-port12 and see what happens.
Thanks.
Bingo! Thanks Jim. Omitting that entire line in the build script has done the trick.
I can now build to current releases of both libgphoto and python-gphoto.
pi@BenchPi3BPlus:~/examples $ python3 gphoto2_version.py
python: 3.9.2 (default, Mar 12 2021, 04:06:34)
[GCC 10.2.1 20210110]
libgphoto2: ['2.5.30.1', 'standard camlib set SKIPPING SOME (ax203 canon digigr8 dimagev directory jl2005a jl2005c kodak_dc240 mars pentax ptp2 ricoh_g3 sierra sonix sq905 st2205 topfield tp6801 SKIPPING docupen lumix)', 'gcc (C compiler used)', 'no ltdl (for portable loading of camlibs)', 'EXIF (for special handling of EXIF files)']
libgphoto2_port: ['0.12.1', 'iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi', 'gcc (C compiler used)', 'no ltdl (for portable loading of iolibs)', 'EXIF (for vusb)', 'USB (libusb1, for USB cameras)', 'serial (for serial cameras)', 'no resmgr (serial port access and locking)', 'no ttylock (serial port locking)', 'no lockdev (serial port locking)']
python-gphoto2: 2.3.4
pi@BenchPi3BPlus:~/examples $
I appreciate the help as always.
- G.
Hi Jim,
I was chasing updates to libgphoto2 last year (#128) but held out for the 2.5.27 wheel(?) baked into Bullseye, but with its arrival I think I'm encountering the issue with the camera reporting 'busy' on its LCD and ignoring the shutter button and bulb input.
This forces me into trying to do my own builds of libgphoto2 (rather than my earlier preferred
sudo apt-get install libgphoto2-dev -y
).Whilst my builds look to go OK, I'm unable to get python-gphoto to work, as below.
Odds are this is due to how I'm building libgphoto2, but I was hoping you might be able to see the error in my ways...
When I queried the Debian folk they said "These recipes should install the development header files as well, but they do so without informing the package system of your OS." Is there an install step I'm missing that's keeping libgphoto2-dev hidden from python-gphoto2?
Your system What version of Python are you using?
Raspberry Pi 3B+ running Raspbian GNU/Linux 11 (bullseye)
What version of libgphoto2 have you installed?
How have you installed (or attempted to install) python-gphoto2?
This is my current install script:
Your problem Please describe what you are trying to do and what goes wrong. A short Python script that shows the problem may be useful.
Does this reveal something? (It's Greek to me).
Thanks.
- Greig.