Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version unknown #50

Closed
sbonaretti opened this issue Jul 8, 2019 · 4 comments
Closed

version unknown #50

sbonaretti opened this issue Jul 8, 2019 · 4 comments

Comments

@sbonaretti
Copy link

Hi! Thanks for developing watermark, it is indeed fundamental to make my workflows reproducible! However, it seems like it cannot read the version of some packages - see attachment. Is there a way to read the version of these packages? Where does watermark get the version from? Thanks!

ScreenShot

@rasbt
Copy link
Owner

rasbt commented Jul 8, 2019

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.

@sbonaretti
Copy link
Author

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!

@rasbt
Copy link
Owner

rasbt commented Oct 2, 2019

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!

@rasbt rasbt mentioned this issue Oct 4, 2019
@rasbt
Copy link
Owner

rasbt commented Oct 4, 2019

Should be fixed now via #54

@rasbt rasbt closed this as completed Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants