version unknown
sbonaretti opened this issue · 4 comments
I think multiprocessing won't have a version number because it's already included in Python. Hence, it's version number would be whatever your Python's version is.
Regarding SimpleITK
and itk
, it looks like they don't support the common __version__
attribute. Do you know by chance how you would get the version from within the package after importing it? It seems like there is nothing within that package that lists the version. Hm.
At the end i solved my issue using:
import pkg_resources
pkg_resources.get_distribution("SimpleITK").version
as suggested here. Not the cleanest way, but it works for now.
Thanks!
That's good to know, thanks! This means we could add an exception (if-clause) for this particular case. This could actually be extended to all packages that don't have a __version__
attribute -- very useful to know, thanks!