0

I know there is already a question about this but it didn't work for me.

When I do

pip install zbar

it returns this

    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\

I tried installing the wheel like the question suggested and it worked for me before. But now it just returns this

zbar-0.10-cp27-none-win_amd64 (1).whl is not a supported wheel on this platform.

It also says to give the return of python --version so this is mine

Python 2.7.15
  • Possible duplicate of [Failed to install zbar with pip on Windows](https://stackoverflow.com/questions/43153688/failed-to-install-zbar-with-pip-on-windows) – phd Jan 24 '19 at 01:46
  • https://stackoverflow.com/search?q=%5Bpip%5D+%5Bzbar%5D+Cannot+open+include+file%3A+%27zbar.h%27 – phd Jan 24 '19 at 01:46
  • *`zbar-0.10-cp27-none-win_amd64.whl` is not a supported wheel on this platform* means that you currently have 32-bit Python, not 64. Either download 32-bit wheel or install 64-bit Python. – phd Jan 24 '19 at 01:47
  • I have the 64-bit version of Python and it still gives me the same result. And it used to work for me and I never reinstalled Python. – loopis jones Jan 25 '19 at 16:53

0 Answers0