-2

I tried to install the Manimlib from the Pycharm's available packages, all the others components are installed, MikTex, Sox, and so on. But i have tried to install pycairo from Pycharm's packages and the pip installation, the following situation comes up:

Collecting pycairo Using cached pycairo-1.19.1.tar.gz (205 kB) Collecting pydub Using cached pydub-0.24.1-py2.py3-none-any.whl (30 kB) Collecting pygments Using cached Pygments-2.6.1-py3-none-any.whl (914 kB) Collecting pyreadline Using cached pyreadline-2.1.zip (109 kB) Using legacy setup.py install for manimlib, since package 'wheel' is not installed. Using legacy setup.py install for pycairo, since package 'wheel' is not installed. Using legacy setup.py install for pyreadline, since package 'wheel' is not installed. Installing collected packages: pycairo, pydub, pygments, pyreadline, manimlib Running setup.py install for pycairo: started Running setup.py install for pycairo: finished with status 'error'

ERROR: Command errored out with exit status 1:
 command: 'C:\Users\CLIENTE\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\CLIENTE\\AppData\\Local\\Temp\\pycharm-packaging\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\CLIENTE\\AppData\\Local\\Temp\\pycharm-packaging\\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\CLIENTE\AppData\Local\Temp\pip-record-4dwk2myc\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\CLIENTE\AppData\Local\Programs\Python\Python38\Include\pycairo'
     cwd: C:\Users\CLIENTE\AppData\Local\Temp\pycharm-packaging\pycairo\
Complete output (20 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\cairo
copying cairo\__init__.py -> build\lib.win-amd64-3.8\cairo
copying cairo\__init__.pyi -> build\lib.win-amd64-3.8\cairo
copying cairo\py.typed -> build\lib.win-amd64-3.8\cairo
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
building 'cairo._cairo' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\cairo
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=19 -DPYCAIRO_VERSION_MICRO=1 -IC:\Users\CLIENTE\AppData\Local\Programs\Python\Python38\include -IC:\Users\CLIENTE\AppData\Local\Programs\Python\Python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include" "-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" /Tccairo/device.c /Fobuild\temp.win-amd64-3.8\Release\cairo/device.obj
device.c
C:\Users\CLIENTE\AppData\Local\Temp\pycharm-packaging\pycairo\cairo\pycairo.h(37): fatal error C1083: NÆo ‚ poss¡vel abrir arquivo incluir: 'cairo.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------

ERROR: Command errored out with exit status 1: 'C:\Users\CLIENTE\AppData\Local\Programs\Python\Python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\CLIENTE\AppData\Local\Temp\pycharm-packaging\pycairo\setup.py'"'"'; file='"'"'C:\Users\CLIENTE\AppData\Local\Temp\pycharm-packaging\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\CLIENTE\AppData\Local\Temp\pip-record-4dwk2myc\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\CLIENTE\AppData\Local\Programs\Python\Python38\Include\pycairo' Check the logs for full command output.

Before that i had installed the MS Visual Studio (2019 and C++ archives) as a requerement to pycairo. How can i fix this problem? (I also tried https://www.lfd.uci.edu/~gohlke/pythonlibs/ with the same problem.)

Duca
  • 1
  • 1

1 Answers1

0

When I first tried downloading Manim, I ran into pycairo not working as well. What fixed this was making sure that I downloaded pycairo meant for Python version 3.7 (Manim currently does not support Python version 3.8), not the latest version which is for Python version 3.8.

(I can't help with the installation through Pycharm, since I don't use it, but...)

On this website: https://www.lfd.uci.edu/~gohlke/pythonlibs/ try downloading pycairo‑1.19.1‑cp37‑cp37m‑win_amd64.whl

Notice how the file name has cp37 which means it's meant for Python Version 3.7. Hope this helps!

EDIT: Also make sure that you are using Python version 3.7

Sony
  • 92
  • 4
  • 9
  • Since i posted my question i tried to install manim on linux (ubuntu 20.04), i did it, but while i was installing i had make a mistake, i alloced only 20GB, all libraries are installed, but for now i have less than 4GB. Thanks for the answer! – Duca Jul 04 '20 at 22:35