我正在尝试通过CMC中的“ pip install”安装zbarlight,并且收到以下错误消息:
C:\Users\Usuário>pip install zbarlight
Collecting zbarlight
Using cached https://files.pythonhosted.org/packages/3d/ee/de1466b1170e347d185dc0c3f75c1100fab03bb2a9544f142bb5bbccd182/zbarlight-2.3.tar.gz
Requirement already satisfied: Pillow in c:\users\usuário\appdata\local\programs\python\python37-32\lib\site-packages (from zbarlight) (6.1.0)
Installing collected packages: zbarlight
Running setup.py install for zbarlight ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\usuário\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USURIO~2\\AppData\\Local\\Temp\\pip-install-qzmg3wl5\\zbarlight\\setup.py'"'"'; __file__='"'"'C:\\Users\\USURIO~2\\AppData\\Local\\Temp\\pip-install-qzmg3wl5\\zbarlight\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\USURIO~2\AppData\Local\Temp\pip-record-obgwez3y\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\USURIO~2\AppData\Local\Temp\pip-install-qzmg3wl5\zbarlight\
Complete output (51 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\zbarlight
copying src\zbarlight\__init__.py -> build\lib.win32-3.7\zbarlight
running egg_info
writing src\zbarlight.egg-info\PKG-INFO
writing dependency_links to src\zbarlight.egg-info\dependency_links.txt
writing requirements to src\zbarlight.egg-info\requires.txt
writing top-level names to src\zbarlight.egg-info\top_level.txt
reading manifest file 'src\zbarlight.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs'
no previously-included directories found matching 'tests'
warning: no previously-included files matching '*.py[cod]' found anywhere in distribution
warning: no previously-included files matching '__pycache__' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files found matching 'Makefile'
warning: no previously-included files found matching 'requirements-dev.txt'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'run.py'
writing manifest file 'src\zbarlight.egg-info\SOURCES.txt'
copying src\zbarlight\_zbarlight.c -> build\lib.win32-3.7\zbarlight
running build_ext
building 'zbarlight._zbarlight' extension
creating build\temp.win32-3.7
creating build\temp.win32-3.7\Release
creating build\temp.win32-3.7\Release\src
creating build\temp.win32-3.7\Release\src\zbarlight
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Ic:\users\usuário\appdata\local\programs\python\python37-32\include -Ic:\users\usuário\appdata\local\programs\python\python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcsrc/zbarlight/_zbarlight.c /Fobuild\temp.win32-3.7\Release\src/zbarlight/_zbarlight.obj -std=c99
cl : Linha de comando warning D9002 : ignorando op‡Æo desconhecida '-std=c99'
_zbarlight.c
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX86\x86\link.exe /nologo /INCREMENTAL:NO /LTCG /nodefaultlib:libucrt.lib ucrt.lib /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\usuário\appdata\local\programs\python\python37-32\libs /LIBPATH:c:\users\usuário\appdata\local\programs\python\python37-32\PCbuild\win32 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\ATLMFC\lib\x86" "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x86" zbar.lib /EXPORT:PyInit__zbarlight build\temp.win32-3.7\Release\src/zbarlight/_zbarlight.obj /OUT:build\lib.win32-3.7\zbarlight\_zbarlight.cp37-win32.pyd /IMPLIB:build\temp.win32-3.7\Release\src/zbarlight\_zbarlight.cp37-win32.lib
Criando biblioteca build\temp.win32-3.7\Release\src/zbarlight\_zbarlight.cp37-win32.lib e objeto build\temp.win32-3.7\Release\src/zbarlight\_zbarlight.cp37-win32.exp
_zbarlight.obj : error LNK2001: símbolos externos indefinidos _zbar_image_set_data
_zbarlight.obj : error LNK2001: símbolos externos indefinidos _zbar_image_destroy
_zbarlight.obj : error LNK2001: símbolos externos indefinidos _zbar_symbol_get_data
_zbarlight.obj : error LNK2001: símbolos externos indefinidos _zbar_image_create
_zbarlight.obj : error LNK2001: símbolos externos indefinidos _zbar_image_scanner_set_config
_zbarlight.obj : error LNK2001: símbolos externos indefinidos _zbar_image_scanner_create
_zbarlight.obj : error LNK2001: símbolos externos indefinidos _zbar_image_scanner_destroy
_zbarlight.obj : error LNK2001: símbolos externos indefinidos _zbar_symbol_next
_zbarlight.obj : error LNK2001: símbolos externos indefinidos _zbar_image_set_format
_zbarlight.obj : error LNK2001: símbolos externos indefinidos _zbar_symbol_get_data_length
_zbarlight.obj : error LNK2001: símbolos externos indefinidos _zbar_image_set_size
_zbarlight.obj : error LNK2001: símbolos externos indefinidos _zbar_image_first_symbol
_zbarlight.obj : error LNK2001: símbolos externos indefinidos _zbar_scan_image
build\lib.win32-3.7\zbarlight\_zbarlight.cp37-win32.pyd : fatal error LNK1120: 13 externo não resolvidos
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.23.28105\\bin\\HostX86\\x86\\link.exe' failed with exit status 1120
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\usuário\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\USURIO~2\\AppData\\Local\\Temp\\pip-install-qzmg3wl5\\zbarlight\\setup.py'"'"'; __file__='"'"'C:\\Users\\USURIO~2\\AppData\\Local\\Temp\\pip-install-qzmg3wl5\\zbarlight\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\USURIO~2\AppData\Local\Temp\pip-record-obgwez3y\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
我已经安装了Microsoft Visual C ++(它的最新版本),已经将bar.h和zbar.lib粘贴到了它们的正确文件夹中,并且在zbarlight安装过程中仍然出现错误,这是我的信息正在接收,不知道该怎么办。有人知道解决这个问题的方法吗?