[Python] pyzbar 오류 해결 방법 / libzbar-64.dll 에러
2022. 9. 28. 20:50ㆍ2018년 이전 관심사/프로그램 언어
반응형
문제
아래 링크에서 발생한 문제로, 아나콘다 환경을 64bit로 변경하니, 기존 32bit 아나콘다에서 잘 사용하던 pyzbar 라이브러리에서 아래와 같이 libzbar-64.dll를 찾을 수 없다는 에러가 발생 했다.
https://kaizen8501.tistory.com/293
FileNotFoundError: Could not find module 'D:\Workspace\venv\testx_64\lib\site-packages\pyzbar\libzbar-64.dll' (or one of its dependencies). Try using the full path with constructor syntax.
(testx_64) D:\Workspace\testxStdJig_V2>python main.py
Traceback (most recent call last):
File "D:\Workspace\venv\testx_64\lib\site-packages\pyzbar\zbar_library.py", line 58, in load
dependencies, libzbar = load_objects(Path(''))
File "D:\Workspace\venv\testx_64\lib\site-packages\pyzbar\zbar_library.py", line 50, in load_objects
deps = [
File "D:\Workspace\venv\testx_64\lib\site-packages\pyzbar\zbar_library.py", line 51, in <listcomp>
cdll.LoadLibrary(str(directory.joinpath(dep)))
File "D:\anaconda3_64\lib\ctypes\__init__.py", line 460, in LoadLibrary
return self._dlltype(name)
File "D:\anaconda3_64\lib\ctypes\__init__.py", line 382, in __init__
self._handle = _dlopen(self._name, mode)
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:
Traceback (most recent call last):
File "D:\Workspace\testxStdJig_V2\main.py", line 11, in <module>
from manager.cameraManager import CameraManager, VideoStreamerThread
File "D:\Workspace\venv\testx_64\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "D:\Workspace\testxStdJig_V2\manager\cameraManager.py", line 18, in <module>
from pyzbar import pyzbar
File "D:\Workspace\venv\testx_64\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "D:\Workspace\venv\testx_64\lib\site-packages\pyzbar\pyzbar.py", line 7, in <module>
from .wrapper import (
File "D:\Workspace\venv\testx_64\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "D:\Workspace\venv\testx_64\lib\site-packages\pyzbar\wrapper.py", line 151, in <module>
zbar_version = zbar_function(
File "D:\Workspace\venv\testx_64\lib\site-packages\pyzbar\wrapper.py", line 148, in zbar_function
return prototype((fname, load_libzbar()))
File "D:\Workspace\venv\testx_64\lib\site-packages\pyzbar\wrapper.py", line 127, in load_libzbar
libzbar, dependencies = zbar_library.load()
File "D:\Workspace\venv\testx_64\lib\site-packages\pyzbar\zbar_library.py", line 60, in load
dependencies, libzbar = load_objects(Path(__file__).parent)
File "D:\Workspace\venv\testx_64\lib\site-packages\pyzbar\zbar_library.py", line 54, in load_objects
libzbar = cdll.LoadLibrary(str(directory.joinpath(fname)))
File "D:\anaconda3_64\lib\ctypes\__init__.py", line 460, in LoadLibrary
return self._dlltype(name)
File "D:\anaconda3_64\lib\ctypes\__init__.py", line 382, in __init__
self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'D:\Workspace\venv\testx_64\lib\site-packages\pyzbar\libzbar-64.dll' (or one of its dependencies). Try using the full path with constructor syntax.
해결 방법
아래 링크에서 Visual C++ 2013 버전을 받아서 설치 하니 위 문제가 해결 되었다.
https://www.microsoft.com/ko-KR/download/details.aspx?id=40784
반응형
'2018년 이전 관심사 > 프로그램 언어' 카테고리의 다른 글
[c언어] inet_ntop (0) | 2023.05.29 |
---|---|
문자열 검색으로 strstr 사용 시, 고려 및 주의 점 (0) | 2023.05.18 |
[Python] object 상속 (0) | 2022.07.12 |
[Python] argparse 사용 방법 (0) | 2022.06.27 |
[Python] struct 모듈을 사용하여 패킹된 바이너리 해석 #1 (0) | 2022.06.17 |