1

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!

phd
  • 82,685
  • 13
  • 120
  • 165
Hannes G
  • 33
  • 6
  • 1
    I think you need [CUPS for w32](https://stackoverflow.com/a/47477703/7976758). See also https://stackoverflow.com/questions/tagged/cups+windows – phd May 25 '20 at 13:26
  • @phd Thanks for the help! I'm using win32print now because it's easier for me. But thanks anyway! – Hannes G May 26 '20 at 14:42

1 Answers1

3

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

CanciuCostin
  • 1,773
  • 1
  • 10
  • 25
  • Ahh thank you! I assumed it and searched for any other option what led me to win32api. I‘m relatively new to Python and don‘t really now, where to look for requirements and so on, so I googled and pycups was what I found. But thank you sincerely for your help! – Hannes G May 26 '20 at 14:31