manim icon indicating copy to clipboard operation
manim copied to clipboard

Problem with pip installation | No module named 'manimlib.imports'

Open purusharths opened this issue 6 years ago • 8 comments

Hello, I tried to install manim via pip on a fresh linux system (Fedora 30), although the installation went smoothly, I got a module not found ModuleNotFoundError stating that there's no file imports.py. The error is pasted below

Media will be stored in ./media/. You can change this behavior by writing a different directory to media_dir.txt.
Traceback (most recent call last):
  File "/home/jarwin/Documents/envs/manimations/bin/manim", line 10, in <module>
    sys.exit(main())
  File "/home/jarwin/Documents/envs/manimations/lib64/python3.7/site-packages/manimlib/__init__.py", line 10, in main
    config = manimlib.config.get_configuration(args)
  File "/home/jarwin/Documents/envs/manimations/lib64/python3.7/site-packages/manimlib/config.py", line 158, in get_configuration
    module = get_module(args.file)
  File "/home/jarwin/Documents/envs/manimations/lib64/python3.7/site-packages/manimlib/config.py", line 153, in get_module
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "svg_test1.py", line 3, in <module>
    from manimlib.imports import *
ModuleNotFoundError: No module named 'manimlib.imports'

I went and looked at the installation directory, and there was indeed no imports.py file.

Screenshot from 2019-05-20 14-25-02

To fix this I manually added imports.py file at the same location given in the screenshot.

purusharths avatar May 20 '19 09:05 purusharths

+1. I installed manim through pip in Solus. Got the same error. Had to copy imports.py from github repo to manimlib directory to make it work.

harshitgarg22 avatar May 23 '19 14:05 harshitgarg22

@eulertour could you do a quick git tag v0.1.4 && git push --tags? This should fix the issue, since the latest version on pypi is from my fork.

soerface avatar May 26 '19 00:05 soerface

I just ran the command, and verified that the corresponding commit hash manimlib.imports. That makes me feel a bit better about it, but really the tests need to be updated to use the pip package.

eulertour avatar May 26 '19 00:05 eulertour

I span up a fedora vm and can confirm that manim installation has imports.py

Kolloom avatar May 27 '19 03:05 Kolloom

how to add manually imports.py?

habibburrahman avatar Dec 16 '20 08:12 habibburrahman

+1. I installed manim through pip in Solus. Got the same error. Had to copy imports.py from github repo to manimlib directory to make it work.

Where do you get this from?

lkssmr avatar Feb 28 '21 17:02 lkssmr

how to add manually imports.py?

https://github.com/3b1b/manim/blob/cf656e9c21ec7f23a71a9f93b503294ec74c1b66/manimlib/imports.py

MesserLancillotto avatar Apr 10 '21 07:04 MesserLancillotto

I believe this is an issue between the two different versions of manim: the community one and Grant’s version. The community one doesn’t include manimlib.imports

JoshOyiki avatar Oct 27 '21 00:10 JoshOyiki