How can I install GDCM with the Python wrapper?

那年仲夏 提交于 2019-12-11 07:27:10

问题


I'm on Ubuntu 16.04 and have been trying like crazy to install GDCM so I can use it with Python. I have pipenv installed, and I suspect that's causing issues.

I did sudo apt-get install libgdcm2.6 python-gdcm. It seems to install fine, but when I run python and then import gdcm, it complains there's no module named gdcm.

Has anyone come across this?


回答1:


This means that the python cannot find the gdcm package within its environment. So your package is not installed properly, and/or your environment has not been configured correctly. Try the following:

  • remove pipenv
  • make sure "import gdcm" works with a 'normal' python environment.

if it does not work you know the problem lies (also) somewhere else:

  • make sure your PYTHONPATH is set correctly and that gdcm is located there (see this answer)

  • Once it works in your normal environment make sure you have read and understand the pipenv documentation and reinstall pipenv and configure your environment



来源:https://stackoverflow.com/questions/54676488/how-can-i-install-gdcm-with-the-python-wrapper

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!