3

我正在尝试为数学动画安装 3blue1brown 的 manimlib 包,一切顺利,直到安装 pycairo

我已按照https://github.com/3b1b/manim的说明下载并安装所有系统要求“ffmpeg、sox、latex 和 cairo”

我还按照说明安装了 Microsoft Visual C++ 构建工具,但是发生了同样的错误。

我尝试 pip install manimlib 并显示以下错误 许多其他安装 manimlib 的教程都给了我同样的错误。

Building wheels for collected packages: pycairo
Building wheel for pycairo (setup.py) ... error
ERROR: Complete output from command 'c:\users\jmcaw\appdata\local\programs\python\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\jmcaw\\AppData\\Local\\Temp\\pip-install-nh2i0b16\\pycairo\\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\jmcaw\AppData\Local\Temp\pip-wheel-mzptag15' --python-tag cp37:
    ERROR: running bdist_wheel
    running build
    running build_py
    creating build
    creating build\lib.win32-3.7
    creating build\lib.win32-3.7\cairo
    copying cairo\__init__.py -> build\lib.win32-3.7\cairo
    copying cairo\__init__.pyi -> build\lib.win32-3.7\cairo
    copying cairo\py.typed -> build\lib.win32-3.7\cairo
    running build_ext
    building 'cairo._cairo' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/


  ----------------------------------------
ERROR: Failed building wheel for pycairo
Running setup.py clean for pycairo
Failed to build pycairo
Installing collected packages: pycairo, manimlib
    Found existing installation: pycairo 1.18.1
    Uninstalling pycairo-1.18.1:
    Successfully uninstalled pycairo-1.18.1
    Running setup.py install for pycairo ... error
    ERROR: Complete output from command
'c:\users\jmcaw\appdata\local\programs\python\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\jmcaw\\AppData\\Local\\Temp\\pip-install-nh2i0b16\\pycairo\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\jmcaw\AppData\Local\Temp\pip-record-bsapizpe\install-record.txt' --single-version-externally-managed --compile:
     ERROR: running install
     running build
     running build_py
     creating build
     creating build\lib.win32-3.7
     creating build\lib.win32-3.7\cairo
     copying cairo\__init__.py -> build\lib.win32-3.7\cairo
     copying cairo\__init__.pyi -> build\lib.win32-3.7\cairo
     copying cairo\py.typed -> build\lib.win32-3.7\cairo
     running build_ext
     building 'cairo._cairo' extension
     error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/


----------------------------------------
Rolling back uninstall of pycairo
Moving to c:\users\jmcaw\appdata\local\programs\python\python37-32\lib\site-packages\cairo\
from c:\users\jmcaw\appdata\local\programs\python\python37-32\lib\site-packages\~airo
Moving to c:\users\jmcaw\appdata\local\programs\python\python37-32\lib\site-packages\pycairo-1.18.1.dist-info\
from c:\users\jmcaw\appdata\local\programs\python\python37-32\lib\site-packages\~ycairo-1.18.1.dist-info
ERROR: Command "'c:\users\jmcaw\appdata\local\programs\python\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\jmcaw\\AppData\\Local\\Temp\\pip-install-nh2i0b16\\pycairo\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\jmcaw\AppData\Local\Temp\pip-record-bsapizpe\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\jmcaw\AppData\Local\Temp\pip-install-nh2i0b16\pycairo\

当使用来自https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycairo的文件 pycairo‑1.18.1‑cp37‑cp37m‑win32.whl 时,pycairo 上的安装可以自行工作,但它似乎尝试卸载它并安装版本 1.18.0 而不是最新的 1.18.1。

4

0 回答 0