通过pip安装pycups缺少cups.h?

Han*_*s G 2 windows pip cups python-3.x pycups

我想通过 pip 安装 pycups 模块,但出现以下错误:

\n\n
Collecting pycups\n  Using cached pycups-2.0.1.tar.gz (62 kB)\nBuilding wheels for collected packages: pycups\n  Building wheel for pycups (setup.py) ... error\n  ERROR: Command errored out with exit status 1:\n   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\'\n       cwd: C:\\Users\\Gebker\\AppData\\Local\\Temp\\pip-install-3bmyk8xu\\pycups\\\n  Complete output (11 lines):\n  running bdist_wheel\n  running build\n  running build_ext\n  building \'cups\' extension\n  creating build\n  creating build\\temp.win32-3.8\n  creating build\\temp.win32-3.8\\Release\n  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\n  cupsmodule.c\n  cupsmodule.c(24): fatal error C1083: Datei (Include) kann nicht ge\xe2\x80\x9dffnet werden: "cups/cups.h": No such file or directory\n  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\n  ----------------------------------------\n  ERROR: Failed building wheel for pycups\n
Run Code Online (Sandbox Code Playgroud)\n\n

我知道它缺少“cups.h”文件,但我不知道如何修复它。\n我已经尝试了多个 Visual C++ 构建工具版本和多个 pycups 版本。其他模块安装完美,但 pycups 不希望安装。

\n\n

运行Windows10、Python 3.8和pip 20.1.1

\n\n

感谢您的帮助!

\n

Can*_*tin 5

您无法在 Windows 上安装它。

\n\n

CUPS 是 Apple Inc. 为 macOS\xc2\xae 和其他类 UNIX\xc2\xae 操作系统开发的基于标准的开源打印系统。

\n\n

您可以阅读文档: https: //pypi.org/project/pycups/

\n\n

在此输入图像描述

\n