2

在我的系统上(通过apt install libgdcm-tools)安装 libgdcm-tools (2.6.6-3) 后,我不再能够pydicom在 Python 中导入。运行时import pydicom as pdc出现以下错误

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

删除 libgdcm-tools 并不能解决问题。

我在 Ubuntu 18.04 中使用 Python 3.7 和 pydicom 2.0.0。

4

1 回答 1

0

确实@scaramallion 的评论为我指明了正确的方向。我在工作目录中没有 gcdm 目录,但在我的主目录中。删除该目录解决了这个问题。

于 2020-07-20T06:58:54.413 回答