Manim: name 'FILE_DIR' is not defined

Created on 7 Aug 2019  路  2Comments  路  Source: 3b1b/manim

When I run some old_projects
I got
"name 'FILE_DIR' is not defined" in file pi_creature.py line 67
constant 'FILE_DIR' is defined in v0.1.5 and older versions (file constants.py line 29)锛宐ut it was canceled after v0.1.6.
How to solve this problem in the latest version?

Most helpful comment

From readme:

Note, however, that developments are often made to the library without considering backwards compatibility with those old projects. To run an old project with a guarantee that it will work, you will have to go back to the commit which completed that project.

The easiest solution I can see is to make a new virtualenv or conda environment and simply install older commit of manim, then run the old project with that. How to install a specific commit with pip is here, you can find the commit hash here on github after clicking on the commit.

All 2 comments

From readme:

Note, however, that developments are often made to the library without considering backwards compatibility with those old projects. To run an old project with a guarantee that it will work, you will have to go back to the commit which completed that project.

The easiest solution I can see is to make a new virtualenv or conda environment and simply install older commit of manim, then run the old project with that. How to install a specific commit with pip is here, you can find the commit hash here on github after clicking on the commit.

From readme:

Note, however, that developments are often made to the library without considering backwards compatibility with those old projects. To run an old project with a guarantee that it will work, you will have to go back to the commit which completed that project.

The easiest solution I can see is to make a new virtualenv or conda environment and simply install older commit of manim, then run the old project with that. How to install a specific commit with pip is here, you can find the commit hash here on github after clicking on the commit.

Even in active folder I get the same error. Why this happened? I try to fix it by create a variable named FILE_DIR but can't fix it. Many script depend on this variable.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Campanulata picture Campanulata  路  4Comments

Glidos picture Glidos  路  5Comments

lucyliu2016 picture lucyliu2016  路  6Comments

liangpu597 picture liangpu597  路  5Comments

BhupalaSriHari picture BhupalaSriHari  路  5Comments