Search code examples
python-3.xwindowspipcupspycups

Installing pycups via pip is missing cups.h?


I want to install pycups module via pip, but I'm getting following error:

Collecting pycups
  Using cached pycups-2.0.1.tar.gz (62 kB)
Building wheels for collected packages: pycups
  Building wheel for pycups (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\gebker\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Gebker\\AppData\\Local\\Temp\\pip-install-3bmyk8xu\\pycups\\setup.py'"'"'; __file__='"'"'C:\\Users\\Gebker\\AppData\\Local\\Temp\\pip-install-3bmyk8xu\\pycups\\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\Gebker\AppData\Local\Temp\pip-wheel-jvk619n9'
       cwd: C:\Users\Gebker\AppData\Local\Temp\pip-install-3bmyk8xu\pycups\
  Complete output (11 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'cups' extension
  creating build
  creating build\temp.win32-3.8
  creating build\temp.win32-3.8\Release
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DVERSION="2.0.1" -Ic:\users\gebker\appdata\local\programs\python\python38-32\include -Ic:\users\gebker\appdata\local\programs\python\python38-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-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" /Tccupsmodule.c /Fobuild\temp.win32-3.8\Release\cupsmodule.obj
  cupsmodule.c
  cupsmodule.c(24): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "cups/cups.h": No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for pycups

I understand its missing the "cups.h" file, but I don't know, how to fix it. I already tried multiple Visual C++ Build Tool versions and multiple pycups versions. Other modules install perfectly, but pycups doesn't want to.

Running Windows10, Python 3.8 and pip 20.1.1

Thanks for your help!


Solution

  • You can't install it on Windows.

    CUPS is the standards-based, open source printing system developed by Apple Inc. for macOS® and other UNIX®-like operating systems.

    You can read the documentation: https://pypi.org/project/pycups/

    enter image description here