jim-easterbrook / python-gphoto2

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

can not install using pip/ or setup #82

Closed rudrab closed 5 years ago

rudrab commented 5 years ago

Hi,

I am in fedora 30 and python 3.7.3

with pip

sudo pip3 install gphoto2
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting gphoto2
  Using cached https://files.pythonhosted.org/packages/6a/2e/8d7b712bc3de6552dd599b57ac400d817c64b4e5630de907981efba460bd/gphoto2-2.0.0.tar.gz
    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-install-c3grrhq1/gphoto2/setup.py", line 38, in <module>
        cmd, stderr=FNULL, universal_newlines=True).split('.')
      File "/usr/lib64/python3.7/subprocess.py", line 395, in check_output
        **kwargs).stdout
      File "/usr/lib64/python3.7/subprocess.py", line 487, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['pkg-config', '--modversion', 'libgphoto2']' returned non-zero exit status 1.

from git

 python3 setup.py build
ERROR: command "pkg-config --modversion libgphoto2" failed
Traceback (most recent call last):
  File "setup.py", line 38, in <module>
    cmd, stderr=FNULL, universal_newlines=True).split('.')
  File "/usr/lib64/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pkg-config', '--modversion', 'libgphoto2']' returned non-zero exit status 1.
jim-easterbrook commented 5 years ago

As the error says, pkg-config --modversion libgphoto2 failed. Either you don't have the pkg-config command (unlikely) or you haven't installed the "development headers" version of libgphoto2. Try running pkg-config --modversion libgphoto2 from the command line.

rudrab commented 5 years ago

Oh... Thanks. I haven't realised I have to install the devel version separately. Thanks for your quick response.