我想通过 pip 安装 pycups 模块,但出现以下错误:
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
我知道它缺少“cups.h”文件,但我不知道如何修复它。我已经尝试了多个 Visual C++ Build Tool 版本和多个 pycups 版本。其他模块安装完美,但 pycups 不想。
运行 Windows10、Python 3.8 和 pip 20.1.1
谢谢你的帮助!