我知道已经有一个问题,但这对我没有用。
当我这样做
pip install zbar
它返回
Collecting zbar
Using cached https://files.pythonhosted.org/packages/33/54/cc5819efc9ee7e34b60b41e1d2d4753b6dd0c26a41c9a552611f66aa106e/zbar-0.10.tar.bz2
Building wheels for collected packages: zbar
Building wheel for zbar (setup.py) ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\johnsonl\\appdata\\local\\temp\\pip-install-sbojn0\\zbar\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d c:\users\johnsonl\appdata\local\temp\pip-wheel-omdejw --python-tag cp27:
running bdist_wheel
running build
running build_ext
building 'zbar' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
C:\Users\JohnsonL\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tczbarmodule.c /Fobuild\temp.win32-2.7\Release\zbarmodule.obj
zbarmodule.c
c:\users\johnsonl\appdata\local\temp\pip-install-sbojn0\zbar\zbarmodule.h(26) : fatal error C1083: Cannot open include file: 'zbar.h': No such file or directory
error: command 'C:\\Users\\JohnsonL\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
----------------------------------------
Failed building wheel for zbar
Running setup.py clean for zbar
Failed to build zbar
Installing collected packages: zbar
Running setup.py install for zbar ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\johnsonl\\appdata\\local\\temp\\pip-install-sbojn0\\zbar\\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\johnsonl\appdata\local\temp\pip-record-fjbzdu\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'zbar' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
C:\Users\JohnsonL\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Ic:\python27\include -Ic:\python27\PC /Tczbarmodule.c /Fobuild\temp.win32-2.7\Release\zbarmodule.obj
zbarmodule.c
c:\users\johnsonl\appdata\local\temp\pip-install-sbojn0\zbar\zbarmodule.h(26) : fatal error C1083: Cannot open include file: 'zbar.h': No such file or directory
error: command 'C:\\Users\\JohnsonL\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\cl.exe' failed with exit status 2
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\johnsonl\\appdata\\local\\temp\\pip-install-sbojn0\\zbar\\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\johnsonl\appdata\local\temp\pip-record-fjbzdu\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\johnsonl\appdata\local\temp\pip-install-sbojn0\zbar\
我尝试按照建议的问题安装方向盘,之前对我有用。但是现在它只返回了
zbar-0.10-cp27-none-win_amd64 (1).whl is not a supported wheel on this platform.
它还说要返回python --version,所以这是我的
Python 2.7.15