datumaro icon indicating copy to clipboard operation
datumaro copied to clipboard

after installing package, can't run a python script

Open Petros626 opened this issue 2 years ago • 2 comments

The message which appears after i install the package is:

  import datumaro.components.annotation as dm_ann
ModuleNotFoundError: No module named 'datumaro.components'; 'datumaro' is not a package

I created this little script for converting a float bounding box into a rounded one:


import datumaro as dm
import datumaro.components.annotation as dm_ann


dm_ann.COORDINATE_ROUNDING_DIGITS = 0

dataset = Dataset.import_from('C:/Users/user/Desktop/xml_to_csv/images2/train/IMG_2462.xml', 'train')
dataset.export('C:/Users/user/Desktop/xml_to_csv/images2/train/output', 'train')

Petros626 avatar Jun 01 '22 12:06 Petros626

Hi. Please make sure you successfully installed datumaro with pip install datumaro (you can check it by running datum --version in the terminal). I can't reproduce the problem, the imports are executed successfully both in v0.2 (version used in CVAT) and v0.3 (the last release).

zhiltsov-max avatar Jun 01 '22 12:06 zhiltsov-max

0.3 is printed, but the second import of the script does not work like in the first message

Petros626 avatar Jun 01 '22 13:06 Petros626