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

No module named 'manim_imports_ext' #10

Open
arbaleast opened this issue Oct 24, 2021 · 14 comments
Open

No module named 'manim_imports_ext' #10

arbaleast opened this issue Oct 24, 2021 · 14 comments

Comments

@arbaleast
Copy link

arbaleast commented Oct 24, 2021

Thank you for sharing this great work!

Traceback (most recent call last):
  File "D:\test.py", line 4, in <module>
    from manim_imports_ext import *
ModuleNotFoundError: No module named 'manim_imports_ext'
[Finished in 0.6s with exit code 1]
[shell_cmd: python -u "D:\test.py"]

$ manimgl -v
[12:10:37] INFO     No OpenGL_accelerate module loaded: acceleratesupport.py:17
                    No module named 'OpenGL_accelerate'
ManimGL v1.2.0

$ manim --version
Manim Community v0.11.0

how to solve these?

@arbaleast
Copy link
Author

arbaleast commented Oct 24, 2021

Thanks, I'm already work out these problem.

@arbaleast
Copy link
Author

arbaleast commented Oct 24, 2021

but I'm rookies, I don't know how to use fourier.py
For example, should I call this function ?

def get_fourier_graph(
    axes, time_func, t_min, t_max,
    n_samples = NUM_SAMPLES_FOR_FFT,
    complex_to_real_func = lambda z : z.real,
    color = RED,
    )

and how to set parameters.Thanks in advance.

@arifyunando
Copy link

Thanks, I'm already work out these problem.

can you tell me how to resolve this, I have the same problem

@arbaleast
Copy link
Author

arbaleast commented Oct 24, 2021

can you tell me how to resolve this, I have the same problem

you need manim_imports_ext.py and custom, put them together
like this
image

@arbaleast
Copy link
Author

arbaleast commented Oct 24, 2021

But I don't know how to use fourier.py
image

@arbaleast
Copy link
Author

arbaleast commented Oct 24, 2021

D:\Project\3blue1brown>manim fourier.py
Manim Community v0.11.0

[18:18:55] INFO     OpenGL_accelerate module loaded                      acceleratesupport.py:13
           INFO     Using accelerated ArrayDatatype                         arraydatatype.py:280

(process:17712): GLib-GIO-WARNING **: 18:18:55.854: Unexpectedly, UWP app `Microsoft.Print3D_3.3.791.0_x64__8wekyb3d8bbwe' (AUMId `Microsoft.Print3D_8wekyb3d8bbwe!App') supports 5 extensions but has no verbs

(process:17712): GLib-GIO-WARNING **: 18:18:55.868: Unexpectedly, UWP app `SiliconBendersLLC.Sketchable_5.0.13.0_x64__r2kxzpx527qgj' (AUMId `SiliconBendersLLC.Sketchable_r2kxzpx527qgj!App') supports 11 extensions but has no verbs

(process:17712): GLib-GIO-WARNING **: 18:18:55.875: Unexpectedly, UWP app `5957Turnipsoft.freda_4.32.2.0_x64__ypmq2qh89vmny' (AUMId `5957Turnipsoft.freda_ypmq2qh89vmny!App') supports 4 extensions but has no verbs

(process:17712): GLib-GIO-WARNING **: 18:18:55.882: Unexpectedly, UWP app `Microsoft.WindowsSoundRecorder_10.1912.10073.0_x64__8wekyb3d8bbwe' (AUMId `Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe!App') supports 1 extensions but has no verbs
[10/24/21 18:18:56] ERROR                                                       module_ops.py:75
                                There are no scenes inside that module

[18:18:56] ERROR                                                                module_ops.py:75
                       There are no scenes inside that module

           DEBUG    Starting new HTTPS connection (1): pypi.org:443        connectionpool.py:939
           DEBUG    https://pypi.org:443 "GET /pypi/manim/json HTTP/1.1"   connectionpool.py:433
                    200 8766

[10/24/21 18:18:56] ERROR                     module_ops.py:75 
There are no scenes inside that module

[18:18:56] ERROR                                     module_ops.py:75
There are no scenes inside that module

maybe I need scenes

@TonyCrane
Copy link

D:\Project\3blue1brown>manim fourier.py
Manim Community v0.11.0

[18:18:55] INFO     OpenGL_accelerate module loaded                      acceleratesupport.py:13
           INFO     Using accelerated ArrayDatatype                         arraydatatype.py:280

(process:17712): GLib-GIO-WARNING **: 18:18:55.854: Unexpectedly, UWP app `Microsoft.Print3D_3.3.791.0_x64__8wekyb3d8bbwe' (AUMId `Microsoft.Print3D_8wekyb3d8bbwe!App') supports 5 extensions but has no verbs

(process:17712): GLib-GIO-WARNING **: 18:18:55.868: Unexpectedly, UWP app `SiliconBendersLLC.Sketchable_5.0.13.0_x64__r2kxzpx527qgj' (AUMId `SiliconBendersLLC.Sketchable_r2kxzpx527qgj!App') supports 11 extensions but has no verbs

(process:17712): GLib-GIO-WARNING **: 18:18:55.875: Unexpectedly, UWP app `5957Turnipsoft.freda_4.32.2.0_x64__ypmq2qh89vmny' (AUMId `5957Turnipsoft.freda_ypmq2qh89vmny!App') supports 4 extensions but has no verbs

(process:17712): GLib-GIO-WARNING **: 18:18:55.882: Unexpectedly, UWP app `Microsoft.WindowsSoundRecorder_10.1912.10073.0_x64__8wekyb3d8bbwe' (AUMId `Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe!App') supports 1 extensions but has no verbs
[10/24/21 18:18:56] ERROR                                                       module_ops.py:75
                                There are no scenes inside that module

[18:18:56] ERROR                                                                module_ops.py:75
                       There are no scenes inside that module

           DEBUG    Starting new HTTPS connection (1): pypi.org:443        connectionpool.py:939
           DEBUG    https://pypi.org:443 "GET /pypi/manim/json HTTP/1.1"   connectionpool.py:433
                    200 8766
[10/24/21 18:18:56] ERROR                     module_ops.py:75 
There are no scenes inside that module

[18:18:56] ERROR                                     module_ops.py:75
There are no scenes inside that module

maybe I need scenes

Don't use the community version to render 3b1b's video code.

@LuisZapataYamo
Copy link

Thank you for sharing this great work!

Traceback (most recent call last):
  File "D:\test.py", line 4, in <module>
    from manim_imports_ext import *
ModuleNotFoundError: No module named 'manim_imports_ext'
[Finished in 0.6s with exit code 1]
[shell_cmd: python -u "D:\test.py"]

$ manimgl -v
[12:10:37] INFO     No OpenGL_accelerate module loaded: acceleratesupport.py:17
                    No module named 'OpenGL_accelerate'
ManimGL v1.2.0

$ manim --version
Manim Community v0.11.0

how to solve these?

Part 1 (Error)

In the module error is for not recognize the root folder.
The solution is add the module sys and also add sys.path.append('.') in your file if it is in:
--root/
---fourier.py
But if your file is in:
--root/
---fourier/
----fourier.py
Then add sys.path.append('..')

Part 2 (Scene)

The principal is the use of the scenes at execute the command manimgl. For example manimgl fourier.py [nameScene].

@pyiso80
Copy link

pyiso80 commented Dec 5, 2021

I've been trying to run 3b1b videos using manimgl. The manim_imports_ext not found can be fixed with 3 methods as far as I could figure out:

  1. adding these 3 lines in the newton_fractal.py file for instance

import sys
sys.path.append(".")
sys.path.append("..")

and running manimgl newton_fractal.py SceneName in Terminal.

2)running the following in Terminal before executing manimgl. Of course you will have to change the path to point to your project folder where 3b1b's src files are placed
export PYTHONPATH=${PYTHONPATH}:/Users/john/Manim/videos

3)I use VSCode and my tasks.json file looks like the following. This is my most preferred way since I use VSCode and running the scene files with tasks is easier.

{
"version": "2.0.0",
"tasks": [
{
"label": "Render",
"type": "shell",
"command": "export PYTHONPATH=${PYTHONPATH}:${workspaceFolder};manimgl ${file} ${input:Scene} ${input:opt}",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
],
"inputs": [
{
"id": "Scene",
"type": "command",
"command": "memento.promptString",
"args": {
"id": "Scene",
"description": "Enter Scene:",
"default": "",
"type": "promptString"
}
},
{
"id": "opt",
"type": "command",
"command": "memento.promptString",
"args": {
"id": "opt",
"description": "Render options",
"default": "-s",
}
}

],

}

@andrewHolsaeter
Copy link

Expanding on option 2 to make it more permanent for windows 10 users:

  1. Search for "Edit system environmental variables" in the windows search bar and click that
  2. Click the "Environment Variables" option
  3. In the User variables section, either click "New" if PYTHONPATH variable doesn't exists already, or "Edit" if it is there
  4. Add the path of where manim_imports_ext.py is located
  5. Click OK/apply to everything and restart your shell

tempsnip

@cornflakesdev
Copy link

cornflakesdev commented Feb 17, 2022

Don't add anything to PATH.

Include custom_config.yml: and it should be fixed.

Your folder hierarchy should look like this:
image

@andrewHolsaeter
Copy link

Neither of us suggested adding anything to PATH. We were suggesting adding to PYTHONPATH which is a list of directories python will use to check for locally installed packages/modules, i.e. main_imports_ext.py.

The problem is that each video code calls from manim_imports_ext import * as the first line of code to execute. If python doesn't find main_imports_ext installed globally, it will look for the module/file in the same directory as the executing script. And obviously it doesn't find it due to the nested folder structure of this repo.

Maybe I'm completely missing something here (very much possible), like something in relation to manim, but there is no way a fresh clone of this and the manim repo will be able to run these video scripts based on the current README isntructions.

Perhaps you (and the devs) intstalled mainim_imports_ext.py globally and forgot about this behavior?

@jsegoviamartin
Copy link

jsegoviamartin commented Aug 26, 2022

Did anybody solve this issue?

@Mathematicien123
Copy link

I have a problem
d ffmpeg or avconv - defaulting to ffmpeg, but may not work
warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)
Traceback (most recent call last):
File "C:\Users\USER\Desktop\python course\sos.py", line 1, in
from manim_imports_ext import *
File "C:\Users\USER\Desktop\python course\manim_imports_ext.py", line 2, in
from manimlib.mobject.svg.old_tex_mobject import *
ModuleNotFoundError: No module named 'manimlib.mobject.svg.old_tex_mobject'

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

9 participants