Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'cairo' #9

Closed
Iamformanim opened this issue Aug 12, 2019 · 7 comments
Closed

ModuleNotFoundError: No module named 'cairo' #9

Iamformanim opened this issue Aug 12, 2019 · 7 comments

Comments

@Iamformanim
Copy link

Iamformanim commented Aug 12, 2019

I did as per your instructions but at the final command

python3 -m manim example_scenes.py WriteStuff -pl

I am getting an error

ModuleNotFoundError: No module named 'cairo

Since I have already Latex so I did not download it. I am attaching a pic of it logo.

Screen Shot 2019-08-12 at 4 32 26 PM

Kindly help.

@Elteoremadebeethoven
Copy link
Owner

That is not a problem of LaTeX, check this

@Iamformanim
Copy link
Author

@Elteoremadebeethoven Now I am in more worse situation. I deleted every progress then I restart it. But now when I am using the command

python3 -m pip install -r requirements.txt

It is showing error

prashants-Air:manim-master richie$ python3 -m pip install -r requirements.txt Requirement already satisfied: argparse==1.4.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (1.4.0) Requirement already satisfied: colour==0.1.5 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (0.1.5) Requirement already satisfied: numpy==1.15.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 3)) (1.15.0) Requirement already satisfied: Pillow==5.2.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 4)) (5.2.0) Requirement already satisfied: progressbar==2.5 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 5)) (2.5) Requirement already satisfied: scipy==1.1.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 6)) (1.1.0) Requirement already satisfied: tqdm==4.24.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 7)) (4.24.0) Requirement already satisfied: opencv-python==3.4.2.17 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 8)) (3.4.2.17) Collecting pycairo==1.17.1 (from -r requirements.txt (line 9)) Using cached https://files.pythonhosted.org/packages/68/76/340ff847897296b2c8174dfa5a5ec3406e3ed783a2abac918cf326abad86/pycairo-1.17.1.tar.gz Requirement already satisfied: pydub==0.23.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from -r requirements.txt (line 10)) (0.23.0) Building wheels for collected packages: pycairo Building wheel for pycairo (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/yd/dqx8kq9d61jb6qb7sy3lmw740000gn/T/pip-install-fcigvsn1/pycairo/setup.py'"'"'; __file__='"'"'/private/var/folders/yd/dqx8kq9d61jb6qb7sy3lmw740000gn/T/pip-install-fcigvsn1/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 /private/var/folders/yd/dqx8kq9d61jb6qb7sy3lmw740000gn/T/pip-wheel-6fg4m5g1 --python-tag cp37 cwd: /private/var/folders/yd/dqx8kq9d61jb6qb7sy3lmw740000gn/T/pip-install-fcigvsn1/pycairo/ Complete output (15 lines): running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.7 creating build/lib.macosx-10.9-x86_64-3.7/cairo copying cairo/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/cairo copying cairo/__init__.pyi -> build/lib.macosx-10.9-x86_64-3.7/cairo copying cairo/py.typed -> build/lib.macosx-10.9-x86_64-3.7/cairo running build_ext Package libffi was not found in the pkg-config search path. Perhaps you should add the directory containing libffi.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libffi', required by 'gobject-2.0', not found
Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.13.1']' returned non-zero exit status 1.

ERROR: Failed building wheel for pycairo
Running setup.py clean for pycairo
Failed to build pycairo
Installing collected packages: pycairo
Running setup.py install for pycairo ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/yd/dqx8kq9d61jb6qb7sy3lmw740000gn/T/pip-install-fcigvsn1/pycairo/setup.py'"'"'; file='"'"'/private/var/folders/yd/dqx8kq9d61jb6qb7sy3lmw740000gn/T/pip-install-fcigvsn1/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 /private/var/folders/yd/dqx8kq9d61jb6qb7sy3lmw740000gn/T/pip-record-mw_a9bq0/install-record.txt --single-version-externally-managed --compile
cwd: /private/var/folders/yd/dqx8kq9d61jb6qb7sy3lmw740000gn/T/pip-install-fcigvsn1/pycairo/
Complete output (15 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.7
creating build/lib.macosx-10.9-x86_64-3.7/cairo
copying cairo/init.py -> build/lib.macosx-10.9-x86_64-3.7/cairo
copying cairo/init.pyi -> build/lib.macosx-10.9-x86_64-3.7/cairo
copying cairo/py.typed -> build/lib.macosx-10.9-x86_64-3.7/cairo
running build_ext
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing libffi.pc' to the PKG_CONFIG_PATH environment variable Package 'libffi', required by 'gobject-2.0', not found Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.13.1']' returned non-zero exit status 1. ---------------------------------------- ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/yd/dqx8kq9d61jb6qb7sy3lmw740000gn/T/pip-install-fcigvsn1/pycairo/setup.py'"'"'; __file__='"'"'/private/var/folders/yd/dqx8kq9d61jb6qb7sy3lmw740000gn/T/pip-install-fcigvsn1/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 /private/var/folders/yd/dqx8kq9d61jb6qb7sy3lmw740000gn/T/pip-record-mw_a9bq0/install-record.txt --single-version-externally-managed --compile Check the logs for full command output. prashants-Air:manim-master richie$

Please help

@Elteoremadebeethoven
Copy link
Owner

Check this and this

@Iamformanim
Copy link
Author

@Elteoremadebeethoven Thanks, I passed that hurdle but now while attempting the example at the end I am getting an error

ModuleNotFoundError: No module named 'manimlib.continual_animation'

@Elteoremadebeethoven
Copy link
Owner

Check this.

Note: In your case it is: python3 -m pip uninstall manimlib

@Iamformanim
Copy link
Author

@Elteoremadebeethoven python3 -m pip uninstall manimlib worked. Thanks, thanks, thanks a lot. Please let me know how can I make maths videos by using manim.

@Elteoremadebeethoven
Copy link
Owner

You can watch my YouTube video series (I use the 3 / Feb version, you don't have to install anything else, just download it in another folder and use it the same), in addition to checking the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants