问题
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