jim-easterbrook / python-gphoto2

Python interface to libgphoto2
GNU Lesser General Public License v3.0
359 stars 59 forks source link

Pip install fails on ubuntu 16.04 (python 2.7) #84

Closed abegus closed 5 years ago

abegus commented 5 years ago

Used command from README: pip install -v gphoto2

 Running setup.py (path:/tmp/pip-build-MB4EBh/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-MB4EBh/gphoto2/setup.py", line 38, in <module>
        cmd, stderr=FNULL, universal_newlines=True).split('.')
      File "/usr/lib/python2.7/subprocess.py", line 574, 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-MB4EBh/gphoto2/
Exception information:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/usr/local/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/local/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/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-MB4EBh/gphoto2/
jim-easterbrook commented 5 years ago

As the message says, the command pkg-config --modversion libgphoto2 failed. This is usually because you haven't installed the "development headers" for libgphoto2. (You'll also need the development headers for Python.)

abegus commented 5 years ago

got it, thanks!