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 'pkg_resources' #2127

Open
peterc-s opened this issue Apr 30, 2024 · 0 comments
Open

ModuleNotFoundError: No module named 'pkg_resources' #2127

peterc-s opened this issue Apr 30, 2024 · 0 comments

Comments

@peterc-s
Copy link

peterc-s commented Apr 30, 2024

Describe the error

Followed this to install manim on arch, had to use pipx instead of pip because you can't use pip to install like that on arch (externally managed environment), when I run manim checkhealth it's fully able to render a test scene, however when checking out the example_scenes.py and running manim example_scenes.py OpeningManimExample as suggested, I get a module error. I tried reinstalling python-setuptools, but to no avail.

Why might it render the checkhealth test scene and not this?

EDIT:
Tried with pipx install manimgl, and getting the same issue with manimgl example_scenes.py OpeningManimExample, included the error below.

Code and Error

Code:
example_scenes.py OpeningManimExample from this repository.

Error:

manim example_scenes.py OpeningManimExample
Manim Community v0.18.1

Traceback (most recent call last):
  File "/home/pete/.local/bin/manim", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/pete/.local/share/pipx/venvs/manim/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pete/.local/share/pipx/venvs/manim/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/pete/.local/share/pipx/venvs/manim/lib/python3.12/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pete/.local/share/pipx/venvs/manim/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pete/.local/share/pipx/venvs/manim/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pete/.local/share/pipx/venvs/manim/lib/python3.12/site-packages/manim/cli/render/commands.py", line 116, in render
    for SceneClass in scene_classes_from_file(file):
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pete/.local/share/pipx/venvs/manim/lib/python3.12/site-packages/manim/utils/module_ops.py", line 131, in scene_classes_from_file
    module = get_module(file_path)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/home/pete/.local/share/pipx/venvs/manim/lib/python3.12/site-packages/manim/utils/module_ops.py", line 54, in get_module
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/pete/Documents/repos/manim/example_scenes.py", line 1, in <module>
    from manimlib import *
  File "/home/pete/Documents/repos/manim/manimlib/__init__.py", line 1, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'
manimgl example_scenes.py OpeningManimExample                                                                      
Traceback (most recent call last):
  File "/home/pete/.local/bin/manimgl", line 5, in <module>
    from manimlib.__main__ import main
  File "/home/pete/.local/share/pipx/venvs/manimgl/lib/python3.12/site-packages/manimlib/__init__.py", line 1, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Environment

OS System: Arch Linux x86_64, Kernel: 6.8.7-arch1-2
manim version: Manim Community v0.18.1
python version: Python 3.12.3

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

1 participant