We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a234ff3 commit f63ba71Copy full SHA for f63ba71
manim/__init__.py
@@ -1,9 +1,16 @@
1
#!/usr/bin/env python
2
from __future__ import annotations
3
4
-from importlib.metadata import version
+from importlib.metadata import PackageNotFoundError, version
5
6
-__version__ = version(__name__)
+# Use installed distribution version if available; otherwise fall back to a
7
+# sensible default so that importing from a source checkout works without an
8
+# editable install (pip install -e .).
9
+try:
10
+ __version__ = version(__name__)
11
+except PackageNotFoundError:
12
+ # Package is not installed; provide a fallback version string.
13
+ __version__ = "0.0.0+unknown"
14
15
16
# isort: off
0 commit comments