question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

manimlib installation error on windows

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
bruceliancommented, Jun 23, 2019

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改编码后安装成功!

1reaction
MedNaitcommented, May 17, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot install this manim lib for python - Stack Overflow
Make sure you used the -r argument in the command, so you do pip3 install -r requirements.txt.
Read more >
FAQ: Installation - Manim Community v0.17.1
The latest version of it is available on PyPI as manimlib , but note that if ... I am using Windows and get...
Read more >
Manim installation instructions for the workshop Windows 10
Installing manim's python Dependencies ... (In any case if you get an error saying ... In the terminal type: pip3 install manimlib pycairo....
Read more >
Installation - manim documentation
If you want to hack on manimlib itself, clone this repository and in that ... and no error message appears, then you have...
Read more >
manimlib - PyPI
manimlib 0.2.0. pip install manimlib ... environment using conda env create -f environment.yml; WINDOWS ONLY Install pyreadline via pip install pyreadline .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found