[GH-ISSUE #2] Import error when trying to run git-sim #1

Closed
opened 2026-03-02 16:46:59 +03:00 by kerem · 4 comments
Owner

Originally created by @Adricu8 on GitHub (Jan 22, 2023).
Original GitHub issue: https://github.com/initialcommit-com/git-sim/issues/2

I installed the package on a mac M1, following the required dependencies and no errors.
When running git-sim -h:

Traceback (most recent call last):
File "/opt/homebrew/anaconda3/envs/git-sim/bin/git-sim", line 5, in
from git_sim.main import main
File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/git_sim/main.py", line 1, in
import git_sim.git_sim as gs
File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/git_sim/git_sim.py", line 1, in
from manim import *
File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/manim/init.py", line 26, in
from .animation.composition import *
File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/manim/animation/composition.py", line 16, in
from ..scene.scene import Scene
File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/manim/scene/scene.py", line 38, in
from ..camera.camera import Camera
File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/manim/camera/camera.py", line 16, in
import cairo
File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/cairo/init.py", line 1, in
from ._cairo import * # noqa: F401,F403
^^^^^^^^^^^^^^^^^^^^^
ImportError: dlopen(/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/cairo/_cairo.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_cairo_append_path'

Originally created by @Adricu8 on GitHub (Jan 22, 2023). Original GitHub issue: https://github.com/initialcommit-com/git-sim/issues/2 I installed the package on a mac M1, following the required dependencies and no errors. When running `git-sim -h`: > Traceback (most recent call last): File "/opt/homebrew/anaconda3/envs/git-sim/bin/git-sim", line 5, in <module> from git_sim.__main__ import main File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/git_sim/__main__.py", line 1, in <module> import git_sim.git_sim as gs File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/git_sim/git_sim.py", line 1, in <module> from manim import * File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/manim/__init__.py", line 26, in <module> from .animation.composition import * File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/manim/animation/composition.py", line 16, in <module> from ..scene.scene import Scene File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/manim/scene/scene.py", line 38, in <module> from ..camera.camera import Camera File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/manim/camera/camera.py", line 16, in <module> import cairo File "/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/cairo/__init__.py", line 1, in <module> from ._cairo import * # noqa: F401,F403 ^^^^^^^^^^^^^^^^^^^^^ ImportError: dlopen(/opt/homebrew/anaconda3/envs/git-sim/lib/python3.11/site-packages/cairo/_cairo.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_cairo_append_path'
kerem closed this issue 2026-03-02 16:46:59 +03:00
Author
Owner

@initialcommit-io commented on GitHub (Jan 23, 2023):

Hi there,

This seems to be a known issue when installing Manim via Anaconda. Check out this link:

https://docs.manim.community/en/latest/faq/installation.html#i-am-using-anaconda-and-get-an-importerror-mentioning-that-some-symbol-is-not-found

"This is because Anaconda environments come with their own preinstalled version of cairo which is not compatible with the version of pycairo required by Manim. Usually it can be fixed by running:

conda install -c conda-forge pycairo

"

Can you try that and let me know if it works for you? Also I definitely recommend not using the system Python on Mac as it can lead to issues. Please make sure you're installing Git-Sim with a Pip that is linked to a Python installed through Homebrew. The Pyenv (https://github.com/pyenv/pyenv) tool might help with making sure the correct version of Python is active.

Let me know how it goes!

<!-- gh-comment-id:1399703870 --> @initialcommit-io commented on GitHub (Jan 23, 2023): Hi there, This seems to be a known issue when installing Manim via Anaconda. Check out this link: https://docs.manim.community/en/latest/faq/installation.html#i-am-using-anaconda-and-get-an-importerror-mentioning-that-some-symbol-is-not-found "This is because Anaconda environments come with their own preinstalled version of cairo which is not compatible with the version of pycairo required by Manim. Usually it can be fixed by running: conda install -c conda-forge pycairo " Can you try that and let me know if it works for you? Also I definitely recommend not using the system Python on Mac as it can lead to issues. Please make sure you're installing Git-Sim with a Pip that is linked to a Python installed through Homebrew. The Pyenv (https://github.com/pyenv/pyenv) tool might help with making sure the correct version of Python is active. Let me know how it goes!
Author
Owner

@initialcommit-io commented on GitHub (Jan 25, 2023):

@Adricu8 Any update on this?

<!-- gh-comment-id:1403206612 --> @initialcommit-io commented on GitHub (Jan 25, 2023): @Adricu8 Any update on this?
Author
Owner

@Adricu8 commented on GitHub (Jan 25, 2023):

Indeed, it was an issue with the anaconda install.
After running conda install -c conda-forge pycairo it worked! Thank you 👍
I will try with anaconda and without it, do you know why can anaconda lead to issues?

<!-- gh-comment-id:1403225248 --> @Adricu8 commented on GitHub (Jan 25, 2023): Indeed, it was an issue with the anaconda install. After running `conda install -c conda-forge pycairo` it worked! Thank you 👍 I will try with anaconda and without it, do you know why can anaconda lead to issues?
Author
Owner

@initialcommit-io commented on GitHub (Jan 25, 2023):

Glad it worked! As I mentioned in the comment above, this is a Manim installation issue and what they said at the link I sent is:

"This is because Anaconda environments come with their own preinstalled version of cairo which is not compatible with the version of pycairo required by Manim."

I will close this since you got it working!

It would be great to get any feedback from you in the future about using Git-Sim. Have a great week!

<!-- gh-comment-id:1403279700 --> @initialcommit-io commented on GitHub (Jan 25, 2023): Glad it worked! As I mentioned in the comment above, this is a Manim installation issue and what they said at the link I sent is: "This is because Anaconda environments come with their own preinstalled version of cairo which is not compatible with the version of pycairo required by Manim." I will close this since you got it working! It would be great to get any feedback from you in the future about using Git-Sim. Have a great week!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-sim#1
No description provided.