# Dynamic versions in editable installations

**URL:** <https://discuss.python.org/t/dynamic-versions-in-editable-installations/15220>\
**Category:** Packaging\
**Created:** [April 21, 2022, 3:13pm UTC](https://discuss.python.org/t/dynamic-versions-in-editable-installations/15220 "2022-04-21T15:13:19Z")\
**Posts on this page:** 1\
**Showing post:** 29

<div class="post-metadata">

**Author:** ![rgommers](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/rgommers/32/837_2.png) [@rgommers](https://discuss.python.org/u/rgommers)\
**Post date:** [June 21, 2022, 5:18pm UTC](https://discuss.python.org/t/dynamic-versions-in-editable-installations/15220/29 "2022-06-21T17:18:22Z")

</div>

> [@tacaswell](#):
>
> A thing you can do with the ` __version__ ` convention (or anything that operates on the already imported module) is:

Another thing you can do is a simple evaluation during debugging, which is very useful and I for one end up doing a lot:

```python
>>> np. __version__'1.24.0.dev0+291.g2c5f407cf6'
>>> import importlib.metadata
>>> importlib.metadata.version("numpy")
'1.22.3'

```

`importlib` is wrong here, it doesn’t seem to understand `PYTHONPATH`. I don’t care too much that it’s less reliable here, since it’s completely unergonomical anyway for interactive use.

> [@tacaswell](#):
>
> I agree with @takluyver that this pattern is very well established in the scientific Python world but go further think we should not remove them.

Agreed

---

_[View the full topic](https://discuss.python.org/t/dynamic-versions-in-editable-installations/15220)._
