Why importing pydicom rise AttributeError: module 'gdcm' has no attribute 'DataElement'

869 Views Asked by At

After having installed libgdcm-tools (2.6.6-3) on my system (via apt install libgdcm-tools) I am not longer able to import pydicom in Python. When running import pydicom as pdc I got the following error

AttributeError: module 'gdcm' has no attribute 'DataElement'.

Removing libgdcm-tools does not solve the issue.

I am working with Python 3.7 and pydicom 2.0.0 in Ubuntu 18.04.

1

There are 1 best solutions below

0
fednem On

Indeed @scaramallion's comment pointed me in the right direction. I didnt't have a gcdm directory in the working directory, but in my home directory. Removing that directory solved the problem.