如何使用 Python 包装器安装 GDCM?
How can I install GDCM with the Python wrapper?
我在 Ubuntu 16.04 上,并且一直在疯狂地尝试安装 GDCM,以便我可以将它与 Python 一起使用。我已经安装了 pipenv
,但我怀疑这是导致问题的原因。
我做到了sudo apt-get install libgdcm2.6 python-gdcm
。它似乎安装得很好,但是当我 运行 python
然后 import gdcm
时,它抱怨没有名为 gdcm
.
的模块
有人遇到过这个吗?
这意味着 python 在其环境中找不到 gdcm 包。所以你的包没有安装好,and/or你的环境没有配置正确。
尝试以下操作:
- 删除 pipenv
- 确保 "import gdcm" 在 'normal' python 环境下工作。
如果它不起作用,您就知道问题出在(也)在其他地方:
确保你的 PYTHONPATH 设置正确并且 gdcm 位于那里(参见 this answer)
一旦它在您的正常环境中工作,请确保 you have read and understand the pipenv documentation 并重新安装 pipenv 并配置您的环境
我在 Ubuntu 16.04 上,并且一直在疯狂地尝试安装 GDCM,以便我可以将它与 Python 一起使用。我已经安装了 pipenv
,但我怀疑这是导致问题的原因。
我做到了sudo apt-get install libgdcm2.6 python-gdcm
。它似乎安装得很好,但是当我 运行 python
然后 import gdcm
时,它抱怨没有名为 gdcm
.
有人遇到过这个吗?
这意味着 python 在其环境中找不到 gdcm 包。所以你的包没有安装好,and/or你的环境没有配置正确。 尝试以下操作:
- 删除 pipenv
- 确保 "import gdcm" 在 'normal' python 环境下工作。
如果它不起作用,您就知道问题出在(也)在其他地方:
确保你的 PYTHONPATH 设置正确并且 gdcm 位于那里(参见 this answer)
一旦它在您的正常环境中工作,请确保 you have read and understand the pipenv documentation 并重新安装 pipenv 并配置您的环境