为什么导入pydicom rise AttributeError:模块“gdcm”没有属性“DataElement”

2024-10-01 07:35:49 发布

您现在位置:Python中文网/ 问答频道 /正文

在我的系统上安装了libgdcm工具(2.6.6-3)(通过apt install libgdcm-tools)之后,我再也无法在Python中导入pydicom。在运行import pydicom as pdc时,我遇到了以下错误

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

删除libgdcm工具并不能解决这个问题

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


Tags: install工具import系统as错误apttools
1条回答
网友
1楼 · 发布于 2024-10-01 07:35:49

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

相关问题 更多 >