manim: manimlib installation error on windows

Upon executing pip install manimlib, on windows, the following is seen.

   Complete output from command C:\Users\sysad\AppData\Local\Programs\Python\Python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\sysad\\AppData\\Local\\Temp\\pip-install-pe8apgh0\\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\sysad\AppData\Local\Temp\pip-record-wtzb25f0\install-record.txt --single-version-externally-managed --compile:
    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/

    ----------------------------------------
Command "C:\Users\sysad\AppData\Local\Programs\Python\Python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\sysad\\AppData\\Local\\Temp\\pip-install-pe8apgh0\\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\sysad\AppData\Local\Temp\pip-record-wtzb25f0\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\sysad\AppData\Local\Temp\pip-install-pe8apgh0\pycairo\

The solution for this is already given in the README.md file, which is to install the wheel for newer version of pycario (1.18.0), but how would that work with pip installation? I tried installing the wheel as given in the instructions, but nevertheless, pip installation fails.

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 16 (3 by maintainers)

Commits related to this issue

Most upvoted comments

Please help

PS C:> pip install manimlib -U --no-cache-dir Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting manimlib Downloading https://pypi.tuna.tsinghua.edu.cn/packages/16/3d/0297d144642077f2ead2df614cfd4be1f0fbd80a174e4ff7e3234428716c/manimlib-0.1.4.tar.gz (2.6MB) |████████████████████████████████| 2.6MB 726kB/s ERROR: Complete output from command python setup.py egg_info: ERROR: ERROR:root:Error parsing Traceback (most recent call last): File “c:\users\liyi\appdata\local\temp\pip-install-12v5bnsx\manimlib.eggs\pbr-5.2.0-py3.7.egg\pbr\core.py”, line 96, in pbr attrs = util.cfg_to_args(path, dist.script_args) File “c:\users\liyi\appdata\local\temp\pip-install-12v5bnsx\manimlib.eggs\pbr-5.2.0-py3.7.egg\pbr\util.py”, line 258, in cfg_to_args pbr.hooks.setup_hook(config) File “c:\users\liyi\appdata\local\temp\pip-install-12v5bnsx\manimlib.eggs\pbr-5.2.0-py3.7.egg\pbr\hooks__init__.py”, line 25, in setup_hook metadata_config.run() File “c:\users\liyi\appdata\local\temp\pip-install-12v5bnsx\manimlib.eggs\pbr-5.2.0-py3.7.egg\pbr\hooks\base.py”, line 27, in run self.hook() File “c:\users\liyi\appdata\local\temp\pip-install-12v5bnsx\manimlib.eggs\pbr-5.2.0-py3.7.egg\pbr\hooks\metadata.py”, line 26, in hook self.config[‘name’], self.config.get(‘version’, None)) File “c:\users\liyi\appdata\local\temp\pip-install-12v5bnsx\manimlib.eggs\pbr-5.2.0-py3.7.egg\pbr\packaging.py”, line 831, in get_version version = get_version_from_pkg_metadata(package_name) File “c:\users\liyi\appdata\local\temp\pip-install-12v5bnsx\manimlib.eggs\pbr-5.2.0-py3.7.egg\pbr\packaging.py”, line 799, in get_version_from_pkg_metadata pkg_metadata = email.message_from_file(pkg_metadata_file) File "D:\Program Files\Python37\lib\email__init.py", line 54, in message_from_file return Parser(*args, **kws).parse(fp) File “D:\Program Files\Python37\lib\email\parser.py”, line 54, in parse data = fp.read(8192) UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0x9c in position 1652: illegal multibyte sequence error in setup command: Error parsing C:\Users\liyi\AppData\Local\Temp\pip-install-12v5bnsx\manimlib\setup.cfg: UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0x9c in position 1652: illegal multibyte sequence

ERROR: Command “python setup.py egg_info” failed with error code 1 in C:\Users\liyi\AppData\Local\Temp\pip-install-12v5bnsx\manimlib can’t install manimlib in Windows.

建议将操作系统编码改为 utf-8(默认gbk),我win10改编码后安装成功!

As for jpl860, the wheel that worked for me was “pycairo‑1.18.0‑cp37‑cp37m‑win_amd64.whl” I suggest you follow the installation procedure described under “Directly (Windows)” in the main page. The procedure is pretty straightforward and easy to follow, you should be able to install it without much difficulty.