Repository: ManimCommunity/manim

Issue:
v0.9.0 is installed but poetry shell says: You are using manim version v0.6.0, but version v0.9.0 is available.
## Description of bug / unexpected behavior
<!-- Add a clear and concise description of the problem you encountered. -->

v0.9.0 is installed but poetry shell says: `You are using manim version v0.6.0, but version v0.9.0 is available.`

This isn't a show stopping issue but it is annoying and has been around for several releases.

## Expected behavior
<!-- Add a clear and concise description of what you expected to happen. -->

The correct version would be displayed.

## How to reproduce the issue
<!-- Provide a piece of code illustrating the undesired behavior. -->

<details><summary>Code for reproducing the problem</summary>

```py
Paste your code here.
```

</details>


## Additional media files
<!-- Paste in the files manim produced on rendering the code above. -->

<details><summary>Images/GIFs</summary>

<!-- PASTE MEDIA HERE -->

</details>


## Logs
<details><summary>Terminal output</summary>
<!-- Add "-v DEBUG" when calling manim to generate more detailed logs -->

```
PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR
```

<!-- Insert screenshots here (only when absolutely necessary, we prefer copy/pasted output!) -->

</details>


## System specifications

<details><summary>System Details</summary>

- OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)): Ubuntu 20.04
- RAM: 16GB
- Python version (`python/py/python3 --version`): 3.8.10
- Installed modules (provide output from `pip list`):
```
Package                           Version
--------------------------------- ------------
alabaster                         0.7.12
anyio                             3.2.1
apipkg                            1.5
appdirs                           1.4.4
argon2-cffi                       20.1.0
astroid                           2.6.2
async-generator                   1.10
attrs                             21.2.0
Babel                             2.9.1
backcall                          0.2.0
backports.entry-points-selectable 1.1.0
beautifulsoup4                    4.9.3
black                             20.8b1
bleach                            3.3.0
certifi                           2021.5.30
cffi                              1.14.6
cfgv                              3.3.0
chardet                           4.0.0
charset-normalizer                2.0.1
click                             8.0.1
click-default-group               1.2.2
cloup                             0.7.1
colorama                          0.4.4
colour                            0.1.5
commonmark                        0.9.1
coverage                          5.5
cycler                            0.10.0
dearpygui                         0.8.31
debugpy                           1.3.0
decorator                         5.0.9
defusedxml                        0.7.1
Deprecated                        1.2.12
distlib                           0.3.2
docutils                          0.16
entrypoints                       0.3
execnet                           1.9.0
filelock                          3.0.12
flake8                            3.9.2
flake8-bugbear                    21.4.3
flake8-builtins                   1.5.3
flake8-comprehensions             3.4.0
flake8-docstrings                 1.6.0
flake8-logging-format             0.6.0
flake8-plugin-utils               1.3.1
flake8-pytest-style               1.4.1
flake8-rst-docstrings             0.0.14
furo                              2021.6.18b36
gitdb                             4.0.7
GitPython                         3.1.18
glcontext                         2.3.4
guzzle-sphinx-theme               0.7.11
identify                          2.2.11
idna                              3.2
imagesize                         1.2.0
iniconfig                         1.1.1
ipykernel                         5.5.5
ipython                           7.25.0
ipython-genutils                  0.2.0
isort                             5.9.2
jedi                              0.18.0
Jinja2                            3.0.1
json5                             0.9.6
jsonschema                        3.2.0
jupyter-client                    6.2.0
jupyter-core                      4.7.1
jupyter-server                    1.9.0
jupyterlab                        3.0.16
jupyterlab-pygments               0.1.2
jupyterlab-server                 2.6.1
kiwisolver                        1.3.1
lazy-object-proxy                 1.6.0
manim                             0.9.0
ManimPango                        0.3.0
mapbox-earcut                     0.12.10
MarkupSafe                        2.0.1
matplotlib                        3.4.2
matplotlib-inline                 0.1.2
mccabe                            0.6.1
mistune                           0.8.4
moderngl                          5.6.4
moderngl-window                   2.4.0
mpmath                            1.2.1
multipledispatch                  0.6.0
mypy-extensions                   0.4.3
nbclassic                         0.3.1
nbclient                          0.5.3
nbconvert                         6.1.0
nbformat                          5.1.3
nest-asyncio                      1.5.1
networkx                          2.6.1
nodeenv                           1.6.0
notebook                          6.4.0
numpy                             1.21.0
packaging                         21.0
pandas                            1.1.5
pandocfilters                     1.4.3
parso                             0.8.2
pathspec                          0.8.1
pexpect                           4.8.0
pickleshare                       0.7.5
Pillow                            8.2.0
pip                               21.0.1
platformdirs                      2.0.2
pluggy                            0.13.1
pre-commit                        2.13.0
prometheus-client                 0.11.0
prompt-toolkit                    3.0.19
psutil                            5.8.0
ptyprocess                        0.7.0
py                                1.10.0
pycairo                           1.20.1
pycodestyle                       2.7.0
pycparser                         2.20
pydocstyle                        6.0.0
pydub                             0.25.1
pyflakes                          2.3.1
PyGithub                          1.55
pyglet                            1.5.18
Pygments                          2.9.0
PyJWT                             2.1.0
pylint                            2.9.3
PyNaCl                            1.4.0
pyparsing                         2.4.7
pyrr                              0.10.3
pyrsistent                        0.18.0
pytest                            6.2.4
pytest-cov                        2.12.1
pytest-forked                     1.3.0
pytest-xdist                      2.3.0
python-dateutil                   2.8.1
pytz                              2021.1
PyYAML                            5.4.1
pyzmq                             22.1.0
recommonmark                      0.7.1
regex                             2021.7.6
requests                          2.26.0
requests-unixsocket               0.2.0
restructuredtext-lint             1.3.2
rich                              10.6.0
scipy                             1.6.0
screeninfo                        0.6.7
Send2Trash                        1.7.1
setuptools                        52.0.0
six                               1.16.0
smmap                             4.0.0
sniffio                           1.2.0
snowballstemmer                   2.1.0
soupsieve                         2.2.1
Sphinx                            3.5.4
sphinx-copybutton                 0.4.0
sphinxcontrib-applehelp           1.0.2
sphinxcontrib-devhelp             1.0.2
sphinxcontrib-htmlhelp            2.0.0
sphinxcontrib-jsmath              1.0.1
sphinxcontrib-qthelp              1.0.3
sphinxcontrib-serializinghtml     1.1.5
sphinxext-opengraph               0.4.2
terminado                         0.10.1
testpath                          0.5.0
toml                              0.10.2
tornado                           6.1
tqdm                              4.61.2
traitlets                         5.0.5
typed-ast                         1.4.3
typing-extensions                 3.10.0.0
urllib3                           1.26.6
virtualenv                        20.5.0
watchdog                          2.1.3
wcwidth                           0.2.5
webencodings                      0.5.1
websocket-client                  1.1.0
wheel                             0.36.2
wrapt                             1.12.1
```
</details>

<details><summary>LaTeX details</summary>

+ LaTeX distribution (e.g. TeX Live 2020):
+ Installed LaTeX packages:
<!-- output of `tlmgr list --only-installed` for TeX Live or a screenshot of the Packages page for MikTeX -->
</details>

<details><summary>FFMPEG</summary>

Output of `ffmpeg -version`:

```
PASTE HERE
```
</details>

## Additional comments
<!-- Add further context that you think might be relevant for this issue here. -->



Discussion:

Resolving patch:
diff --git a/manim/__init__.py b/manim/__init__.py
--- a/manim/__init__.py
+++ b/manim/__init__.py
@@ -2,12 +2,9 @@
 
 # flake8: noqa
 
-try:
-    import importlib.metadata as importlib_metadata
-except ModuleNotFoundError:
-    import importlib_metadata
+import pkg_resources
 
-__version__ = importlib_metadata.version(__name__)
+__version__ = pkg_resources.get_distribution(__name__).version
 
 
 import sys


Test patch: