2025-05-28
現象
winでpyzbarが動かない
エラー箇所
from pyzbar.pyzbar import decode
エラー文
Could not find module 'c:\Users\nag\Documents\repo\qrkun\.venv\Lib\site-packages\pyzbar\libzbar-64.dll' (or one of its dependencies). Try using the full path with constructor syntax.
FileNotFoundError: Could not find module 'libiconv.dll' (or one of its dependencies). Try using the full path with constructor syntax. During handling of the above exception, another exception occurred: File "C:\Users\nag\Documents\repo\qrkun\main.py", line 5, in <module> from pyzbar.pyzbar import decode FileNotFoundError: Could not find module 'c:\Users\nag\Documents\repo\qrkun\.venv\Lib\site-packages\pyzbar\libzbar-64.dll' (or one of its dependencies). Try using the full path with constructor syntax.
libzbar-64.dllもlibiconv.dllも明らかにsite-packages以下に存在する
パスの問題ではなさそう
だめだった試み
最新の Microsoft Visual C++ 再頒布可能パッケージ バージョン
VC_redist.x86.exe
をダウンロードしてインストール
解決
Visual Studio 2013 の Visual C++ 再頒布可能パッケージ
vcredist_x64.exe
をダウンロードしてインストール
これで直った
よかったね