【发布时间】:2018-08-15 21:07:41
【问题描述】:
我已经安装了 exiftool (https://smarnach.github.io/pyexiftool/) 并且能够导入库,但是在尝试运行测试数据以查看它是否有效时出现以下错误。
ERROR: test_get_metadata (__main__.TestExifTool)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Program Files\Python36\Lib\site-
packages\pyexiftool\test\test_exiftool.py", line 66, in test_get_metadata
with self.et:
File "C:\Program Files\Python36\lib\site-packages\exiftool.py", line 191, in __enter__
self.start()
File "C:\Program Files\Python36\lib\site-packages\exiftool.py", line 174, in start
stderr=devnull)
File "C:\Program Files\Python36\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "C:\Program Files\Python36\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
我也确实运行了 exiftool 文件夹中的设置代码,但仍然没有运气。我认为这可能是库问题或路径或 (init.py) 文件,但我已经尝试了几种方法,所以我在这里询问其他人是否有解决方案或想法我尝试修复它。
我正在运行 Python 3.6.6 并尝试过其他版本。
(我可以在命令行中运行 exiftool,但是我已经编码了 exiftool 在命令行中无法完全解码的 BASE64 图像。)
【问题讨论】:
-
exiftool 在您计算机上的位置?它是否在 PATH 环境变量的一部分目录中?
-
它在python的C:\Python36\Lib\site-packages中,是否还需要将pyexiftool添加到PATH环境变量中?
-
我还尝试将实际的 exiftool.exe 添加到路径中,以防我错过了我实际上仍然需要 exiftool.exe 应用程序来运行 python 代码这一点。
标签: python module file-not-found exiftool