DeepLabCut / DeepLabCut-core

Headless DeepLabCut (no GUI support)
http://deeplabcut.org
GNU Lesser General Public License v3.0
30 stars 17 forks source link

Import version information into the module #20

Closed stes closed 3 years ago

stes commented 3 years ago

One line fix to automatically import the __version__ attribute as in the main DLC package for consistency between the packages.

Steps to repro

For deeplabcutcore, run:

try:
    import deeplabcut as dlc
except ModuleNotFoundError:
    import deeplabcutcore as dlc
import tensorflow as tf
print(f"Loaded DeepLabCut {dlc.__version__} for Tensorflow {tf.__version__}")

raises

Traceback (most recent call last):                                                 
  File "test.py", line 8, in <module>                                              
    print(f"Loaded DeepLabCut {dlc.__version__} for Tensorflow {tf.__version__}")  
AttributeError: module 'deeplabcutcore' has no attribute '__version__'             
AlexEMG commented 3 years ago

Good point! That was forgotten