0

下面输入的是 pip 尝试安装 pyzopfli 和 zopflipng 的完整输出,zopfli 和 zopflipy 模块安装良好,但由于某种原因这两个模块不合作。

我知道的一件事是,由于 GH repo 上的写访问权限丢失,pyzopfli 模块没有得到维护。我不太在意那个,但是我去尝试了 zopflipng 模块,我发现安装的错误非常相似。

有人对此有任何见解吗?

更新: python 3.9.5 和 3.6.8 上的相同错误

pyzopfli 尝试使用 pip

C:\WINDOWS\system32>pip install --upgrade pyzopfli
Collecting pyzopfli
  Downloading pyzopfli-0.1.0.zip (70 kB)
     |████████████████████████████████| 70 kB 1.5 MB/s
Building wheels for collected packages: pyzopfli
  Building wheel for pyzopfli (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\program files\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\[user]\\AppData\\Local\\Temp\\pip-install-n16fdr96\\pyzopfli_0e36e8e3f3ec481fa60da29e442827b9\\setup.py'"'"'; __file__='"'"'C:\\Users\\[user]\\AppData\\Local\\Temp\\pip-install-n16fdr96\\pyzopfli_0e36e8e3f3ec481fa60da29e442827b9\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\[user]\AppData\Local\Temp\pip-wheel-dssh56xf'
       cwd: C:\Users\[user]\AppData\Local\Temp\pip-install-n16fdr96\pyzopfli_0e36e8e3f3ec481fa60da29e442827b9\
  Complete output (38 lines):
  c:\program files\python39\lib\distutils\extension.py:131: UserWarning: Unknown Extension options: 'opts'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  file pyzopfli.py (for module pyzopfli) not found
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\pyzopfli
  copying pyzopfli\__init__.py -> build\lib.win-amd64-3.9\pyzopfli
  copying pyzopfli\zlib.py -> build\lib.win-amd64-3.9\pyzopfli
  running egg_info
  writing pyzopfli.egg-info\PKG-INFO
  writing dependency_links to pyzopfli.egg-info\dependency_links.txt
  writing top-level names to pyzopfli.egg-info\top_level.txt
  file pyzopfli.py (for module pyzopfli) not found
  reading manifest file 'pyzopfli.egg-info\SOURCES.txt'
  writing manifest file 'pyzopfli.egg-info\SOURCES.txt'
  copying pyzopfli\blocksplitter.c -> build\lib.win-amd64-3.9\pyzopfli
  copying pyzopfli\cache.c -> build\lib.win-amd64-3.9\pyzopfli
  copying pyzopfli\deflate.c -> build\lib.win-amd64-3.9\pyzopfli
  copying pyzopfli\hash.c -> build\lib.win-amd64-3.9\pyzopfli
  copying pyzopfli\katajainen.c -> build\lib.win-amd64-3.9\pyzopfli
  copying pyzopfli\lz77.c -> build\lib.win-amd64-3.9\pyzopfli
  copying pyzopfli\squeeze.c -> build\lib.win-amd64-3.9\pyzopfli
  copying pyzopfli\tree.c -> build\lib.win-amd64-3.9\pyzopfli
  copying pyzopfli\util.c -> build\lib.win-amd64-3.9\pyzopfli
  copying pyzopfli\zopflimodule.c -> build\lib.win-amd64-3.9\pyzopfli
  file pyzopfli.py (for module pyzopfli) not found
  running build_ext
  building 'pyzopfli.zopfli' extension
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\pyzopfli
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\program files\python39\include -Ic:\program files\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcpyzopfli/blocksplitter.c /Fobuild\temp.win-amd64-3.9\Release\pyzopfli/blocksplitter.obj
  blocksplitter.c
  pyzopfli/blocksplitter.c(20): fatal error C1083: Cannot open include file: 'blocksplitter.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for pyzopfli
  Running setup.py clean for pyzopfli
Failed to build pyzopfli
Installing collected packages: pyzopfli
    Running setup.py install for pyzopfli ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\program files\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\[user]\\AppData\\Local\\Temp\\pip-install-n16fdr96\\pyzopfli_0e36e8e3f3ec481fa60da29e442827b9\\setup.py'"'"'; __file__='"'"'C:\\Users\\[user]\\AppData\\Local\\Temp\\pip-install-n16fdr96\\pyzopfli_0e36e8e3f3ec481fa60da29e442827b9\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\[user]\AppData\Local\Temp\pip-record-gm8b41mm\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\program files\python39\Include\pyzopfli'
         cwd: C:\Users\[user]\AppData\Local\Temp\pip-install-n16fdr96\pyzopfli_0e36e8e3f3ec481fa60da29e442827b9\
    Complete output (38 lines):
    c:\program files\python39\lib\distutils\extension.py:131: UserWarning: Unknown Extension options: 'opts'
      warnings.warn(msg)
    running install
    running build
    running build_py
    file pyzopfli.py (for module pyzopfli) not found
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\pyzopfli
    copying pyzopfli\__init__.py -> build\lib.win-amd64-3.9\pyzopfli
    copying pyzopfli\zlib.py -> build\lib.win-amd64-3.9\pyzopfli
    running egg_info
    writing pyzopfli.egg-info\PKG-INFO
    writing dependency_links to pyzopfli.egg-info\dependency_links.txt
    writing top-level names to pyzopfli.egg-info\top_level.txt
    file pyzopfli.py (for module pyzopfli) not found
    reading manifest file 'pyzopfli.egg-info\SOURCES.txt'
    writing manifest file 'pyzopfli.egg-info\SOURCES.txt'
    copying pyzopfli\blocksplitter.c -> build\lib.win-amd64-3.9\pyzopfli
    copying pyzopfli\cache.c -> build\lib.win-amd64-3.9\pyzopfli
    copying pyzopfli\deflate.c -> build\lib.win-amd64-3.9\pyzopfli
    copying pyzopfli\hash.c -> build\lib.win-amd64-3.9\pyzopfli
    copying pyzopfli\katajainen.c -> build\lib.win-amd64-3.9\pyzopfli
    copying pyzopfli\lz77.c -> build\lib.win-amd64-3.9\pyzopfli
    copying pyzopfli\squeeze.c -> build\lib.win-amd64-3.9\pyzopfli
    copying pyzopfli\tree.c -> build\lib.win-amd64-3.9\pyzopfli
    copying pyzopfli\util.c -> build\lib.win-amd64-3.9\pyzopfli
    copying pyzopfli\zopflimodule.c -> build\lib.win-amd64-3.9\pyzopfli
    file pyzopfli.py (for module pyzopfli) not found
    running build_ext
    building 'pyzopfli.zopfli' extension
    creating build\temp.win-amd64-3.9
    creating build\temp.win-amd64-3.9\Release
    creating build\temp.win-amd64-3.9\Release\pyzopfli
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\program files\python39\include -Ic:\program files\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /Tcpyzopfli/blocksplitter.c /Fobuild\temp.win-amd64-3.9\Release\pyzopfli/blocksplitter.obj
    blocksplitter.c
    pyzopfli/blocksplitter.c(20): fatal error C1083: Cannot open include file: 'blocksplitter.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\[user]\\AppData\\Local\\Temp\\pip-install-n16fdr96\\pyzopfli_0e36e8e3f3ec481fa60da29e442827b9\\setup.py'"'"'; __file__='"'"'C:\\Users\\[user]\\AppData\\Local\\Temp\\pip-install-n16fdr96\\pyzopfli_0e36e8e3f3ec481fa60da29e442827b9\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\[user]\AppData\Local\Temp\pip-record-gm8b41mm\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\program files\python39\Include\pyzopfli' Check the logs for full command output.

zopflipng 尝试使用 pip

C:\WINDOWS\system32>pip install --upgrade zopflipng --no-color -V -V -V
Collecting zopflipng
  Using cached zopflipng-1.0.2.tar.gz (113 kB)
Building wheels for collected packages: zopflipng
  Building wheel for zopflipng (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\program files\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\[user]\\AppData\\Local\\Temp\\pip-install-w2jaiv91\\zopflipng_78033bde72404827a2aa991e233b2366\\setup.py'"'"'; __file__='"'"'C:\\Users\\[user]\\AppData\\Local\\Temp\\pip-install-w2jaiv91\\zopflipng_78033bde72404827a2aa991e233b2366\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\[user]\AppData\Local\Temp\pip-wheel-fdp1yjp7'
       cwd: C:\Users\[user]\AppData\Local\Temp\pip-install-w2jaiv91\zopflipng_78033bde72404827a2aa991e233b2366\
  Complete output (29 lines):
  c:\program files\python39\lib\distutils\extension.py:131: UserWarning: Unknown Extension options: 'include_file'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\zopflipng
  copying src\zopflipng\__init__.py -> build\lib.win-amd64-3.9\zopflipng
  running egg_info
  writing src\zopflipng.egg-info\PKG-INFO
  writing dependency_links to src\zopflipng.egg-info\dependency_links.txt
  writing top-level names to src\zopflipng.egg-info\top_level.txt
  reading manifest file 'src\zopflipng.egg-info\SOURCES.txt'
  writing manifest file 'src\zopflipng.egg-info\SOURCES.txt'
  running build_ext
  building 'zopflipng._clib' extension
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\src
  creating build\temp.win-amd64-3.9\Release\zopfli
  creating build\temp.win-amd64-3.9\Release\zopfli\src
  creating build\temp.win-amd64-3.9\Release\zopfli\src\zopfli
  creating build\temp.win-amd64-3.9\Release\zopfli\src\zopflipng
  creating build\temp.win-amd64-3.9\Release\zopfli\src\zopflipng\lodepng
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\program files\python39\include -Ic:\program files\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /EHsc /Tpsrc/py_zopflipng.cc /Fobuild\temp.win-amd64-3.9\Release\src/py_zopflipng.obj
  py_zopflipng.cc
  src/py_zopflipng.cc(1): fatal error C1083: Cannot open include file: '../zopfli/src/zopflipng/zopflipng_lib.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for zopflipng
  Running setup.py clean for zopflipng
Failed to build zopflipng
Installing collected packages: zopflipng
    Running setup.py install for zopflipng ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\program files\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\[user]\\AppData\\Local\\Temp\\pip-install-w2jaiv91\\zopflipng_78033bde72404827a2aa991e233b2366\\setup.py'"'"'; __file__='"'"'C:\\Users\\[user]\\AppData\\Local\\Temp\\pip-install-w2jaiv91\\zopflipng_78033bde72404827a2aa991e233b2366\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\[user]\AppData\Local\Temp\pip-record-p2oigv7c\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\program files\python39\Include\zopflipng'
         cwd: C:\Users\[user]\AppData\Local\Temp\pip-install-w2jaiv91\zopflipng_78033bde72404827a2aa991e233b2366\
    Complete output (29 lines):
    c:\program files\python39\lib\distutils\extension.py:131: UserWarning: Unknown Extension options: 'include_file'
      warnings.warn(msg)
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\zopflipng
    copying src\zopflipng\__init__.py -> build\lib.win-amd64-3.9\zopflipng
    running egg_info
    writing src\zopflipng.egg-info\PKG-INFO
    writing dependency_links to src\zopflipng.egg-info\dependency_links.txt
    writing top-level names to src\zopflipng.egg-info\top_level.txt
    reading manifest file 'src\zopflipng.egg-info\SOURCES.txt'
    writing manifest file 'src\zopflipng.egg-info\SOURCES.txt'
    running build_ext
    building 'zopflipng._clib' extension
    creating build\temp.win-amd64-3.9
    creating build\temp.win-amd64-3.9\Release
    creating build\temp.win-amd64-3.9\Release\src
    creating build\temp.win-amd64-3.9\Release\zopfli
    creating build\temp.win-amd64-3.9\Release\zopfli\src
    creating build\temp.win-amd64-3.9\Release\zopfli\src\zopfli
    creating build\temp.win-amd64-3.9\Release\zopfli\src\zopflipng
    creating build\temp.win-amd64-3.9\Release\zopfli\src\zopflipng\lodepng
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\program files\python39\include -Ic:\program files\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include -IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt /EHsc /Tpsrc/py_zopflipng.cc /Fobuild\temp.win-amd64-3.9\Release\src/py_zopflipng.obj
    py_zopflipng.cc
    src/py_zopflipng.cc(1): fatal error C1083: Cannot open include file: '../zopfli/src/zopflipng/zopflipng_lib.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\[user]\\AppData\\Local\\Temp\\pip-install-w2jaiv91\\zopflipng_78033bde72404827a2aa991e233b2366\\setup.py'"'"'; __file__='"'"'C:\\Users\\[user]\\AppData\\Local\\Temp\\pip-install-w2jaiv91\\zopflipng_78033bde72404827a2aa991e233b2366\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\[user]\AppData\Local\Temp\pip-record-p2oigv7c\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\program files\python39\Include\zopflipng' Check the logs for full command output.
4

0 回答 0