0

每当我尝试使用 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\

我怎样才能解决这个问题?

4

1 回答 1

1

试试 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)inf-wizard从 libusb/bin 文件夹安装 libusb 运行,选择你的相机并点击安装

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

于 2019-06-19T15:57:07.850 回答