如何安装gphoto2?

时间:2018-08-21 10:23:35

标签: python-2.7 libgphoto2

每当我尝试使用pip安装gphoto2时,都会弹出此错误消息:


C:\ Python27> pip安装gphoto2

Collecting gphoto2
  Using cached https://files.pythonhosted.org/packages/13/20/16f4e17e0d799199c84
a7d3e4f181232071383acf71912da44de015b1812/gphoto2-1.8.3.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 "C:\Users\MACIE_~1\AppData\Local\Temp\pip-install-xybqgvtu\gphoto2\se
tup.py", line 38, in <module>
    cmd, stderr=FNULL, universal_newlines=True).split('.')
  File "c:\users\macie_000\appdata\local\programs\python\python37\lib\subpro
cess.py", line 376, in check_output
    **kwargs).stdout
  File "c:\users\macie_000\appdata\local\programs\python\python37\lib\subpro
cess.py", line 453, in run
    with Popen(*popenargs, **kwargs) as process:
  File "c:\users\macie_000\appdata\local\programs\python\python37\lib\subpro
cess.py", line 756, in __init__
    restore_signals, start_new_session)
  File "c:\users\macie_000\appdata\local\programs\python\python37\lib\subpro
cess.py", line 1155, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] Nie można odnaleźć określonego pliku

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\MACIE_~1
\AppData\Local\Temp\pip-install-xybqgvtu\gphoto2\

我该如何解决?

1 个答案:

答案 0 :(得分:0)

尝试从sourceforge获得独立版本。 1)下载libusb和gphoto http://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/

https://code.google.com/p/scan-manager/downloads/detail?name=gphoto-2.4.14-win32-build2.zip&can=2&q=

2)解压缩两个文件

3)连接相机并开启

4)安装libusb 从libusb / bin文件夹运行inf-wizard,选择您的相机并点击安装

5)从gphoto2 / bin文件夹运行gphoto2