jim-easterbrook / python-gphoto2

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

pip install fails on OS X #43

Closed varunrau closed 6 years ago

varunrau commented 6 years ago
$ pip install -v gphoto2

...

  Looking up "https://pypi.python.org/packages/f8/6b/90b671ab3805f939d5b2ba9428472d18e472a4efc93f9158c4d0f24ef25e/gphoto2-1.8.1.tar.gz" in the cache
  Current age based on date: 706
  Freshness lifetime from max-age: 31557600
  The response is "fresh", returning cached response
  31557600 > 706
  Using cached gphoto2-1.8.1.tar.gz
  Downloading from URL https://pypi.python.org/packages/f8/6b/90b671ab3805f939d5b2ba9428472d18e472a4efc93f9158c4d0f24ef25e/gphoto2-1.8.1.tar.gz#md5=9dbceae88aaae398a9bceed35b5cb2ed (from https://pypi.python.org/simple/gphoto2/)
  Running setup.py (path:/private/var/folders/m2/lx07_jr55nx7_5nzcs0ftk6r0000gn/T/pip-build-rgDNkp/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 "/private/var/folders/m2/lx07_jr55nx7_5nzcs0ftk6r0000gn/T/pip-build-rgDNkp/gphoto2/setup.py", line 38, in <module>
        cmd, stderr=FNULL, universal_newlines=True).split('.')
      File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, 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 /private/var/folders/m2/lx07_jr55nx7_5nzcs0ftk6r0000gn/T/pip-build-rgDNkp/gphoto2/
Exception information:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 335, in run
    wb.build(autobuilding=True)
  File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/usr/local/lib/python2.7/site-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/site-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/site-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 /private/var/folders/m2/lx07_jr55nx7_5nzcs0ftk6r0000gn/T/pip-build-rgDNkp/gphoto2/

When I try running that command, I get this:

$ pkg-config --modversion libgphoto2
Package libgphoto2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libgphoto2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libgphoto2' found

This is on OS X 13.1. Any idea why pkg-config doesn't know about the package?

Thanks!

varunrau commented 6 years ago

oops sorry I didn't notice that brew had failed to install libgphoto2! The pip command works now!