Closed Nic2012 closed 6 years ago
The _list
module is the compiled C code and should be in the same directory as the Python module list.py
. What's in the directory /usr/local/lib/python2.7/dist-packages/gphoto2/
?
Later I have installed some other python stuff and libudev etc. and afterwards it runs fine, not sure what was really missing, the content is currently:
pi@pi64:~$ ls /usr/local/lib/python2.7/dist-packages/gphoto2
abilities_list.py camera.pyc _context.so filesys.py __init__.pyc port_info_list.py port_log.pyc _result.so widget.py
abilities_list.pyc _camera.so file.py filesys.pyc list.py port_info_list.pyc _port_log.so version.py widget.pyc
_abilities_list.so context.py file.pyc _filesys.so list.pyc _port_info_list.so result.py version.pyc _widget.so
camera.py context.pyc _file.so __init__.py _list.so port_log.py result.pyc _version.so
I guess thats looks ok. Strange thing is on this distro I have to call the commands by sudo, no matter if its python-gphoto2 or the regular gphoto2 cli.
pi@pi64:~$ python /usr/local/share/python-gphoto2/examples/camera-summary.py
WARNING: gphoto2: (gp_libusb1_open [libusb1.c:392]) 'libusb_open (port->pl->d, &port->pl->dh)' failed: Access denied (insufficient permissions) (-3)
Traceback (most recent call last):
File "/usr/local/share/python-gphoto2/examples/camera-summary.py", line 60, in <module>
sys.exit(main())
File "/usr/local/share/python-gphoto2/examples/camera-summary.py", line 33, in main
gp.check_result(gp.gp_camera_init(camera, context))
File "/usr/local/lib/python2.7/dist-packages/gphoto2/result.py", line 162, in check_result
raise GPhoto2Error(error)
gphoto2.GPhoto2Error: [-7] I/O problem
The sudo requirement is possibly because of permissions on the USB port. You might need to add your regular user to a USB group, or add a udev rule to change the permissions.
Yeah, that makes sense, thank y for y support.
For future reference: I've just discovered (while experimenting with MSYS2 on Windows) that installing libtool
can cure some module loading problems.
Hi, great stuff here and I would like to try it on a new RaspberryPI 3 distro pi64 https://github.com/bamarni/pi64.
Installed libgphoto 2.5.15 based on http://blog.marcelkrauskopfphotography.de/category/raspberry-pi/ Installed python-gphoto by
sudo pip install -v gphoto2
without problems.lsusb gives me
But running the example return exceptions:
Using Python 2.7.13 and libgphoto2-2.5.15.
Any ideas would be appreciated. Best regards, Nic