I am trying to install the gphoto2 library for Python on a Raspberry Pi B+ and I get this error:
pi@mazePi:~ $ pip install gphoto2
Collecting gphoto2
Downloading https://files.pythonhosted.org/packages/fd/d7/7660013e81138c73232a62010d3d8816028d8a025d2e62c326dc07e9bb5f/gphoto2-1.8.2.tar.gz (7.2MB)
100% |████████████████████████████████| 7.2MB 12kB/s
Complete output from command python setup.py egg_info:
ERROR: command "pkg-config --modversion libgphoto2" failed
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-kqalDU/gphoto2/setup.py", line 38, in <module>
cmd, stderr=FNULL, universal_newlines=True).split('.')
File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['pkg-config', '--modversion', 'libgphoto2']' returned non-zero exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-kqalDU/gphoto2/
When running in verbose mode, I get:
Running setup.py (path:/tmp/pip-build-lLGQBj/gphoto2/setup.py) egg_info for package gphoto2
Running command python setup.py egg_info
ERROR: command "pkg-config --modversion libgphoto2" failed
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-lLGQBj/gphoto2/setup.py", line 38, in <module>
cmd, stderr=FNULL, universal_newlines=True).split('.')
File "/usr/lib/python2.7/subprocess.py", line 219, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['pkg-config', '--modversion', 'libgphoto2']' returned non-zero exit status 1
Cleaning up...
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lLGQBj/gphoto2/
Exception information:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run
wb.build(autobuilding=True)
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 634, in _prepare_file
abstract_dist.prep_for_dist()
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 439, in run_egg_info
command_desc='python setup.py egg_info')
File "/usr/lib/python2.7/dist-packages/pip/utils/__init__.py", line 725, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-lLGQBj/gphoto2/
What is wrong?
apt list pkg-config
on your Pi?pkg-config
is indeed installed. Try runningpip install -v gphoto2
to see if the verbose output is helpful.libgphoto2
headers? Check withapt list libgphoto2-dev
- it should say[installed]
if it is. (by the way, you can edit information into your question; no need to use Pastebin)