本文介绍了如何使用 Python 包装器安装 GDCM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Ubuntu 16.04,并且一直在疯狂地尝试安装 GDCM,以便我可以将它与 Python 一起使用.我安装了 pipenv,我怀疑这会导致问题.

我做了sudo apt-get install libgdcm2.6 python-gdcm.它似乎安装得很好,但是当我运行 python 然后 import gdcm 时,它抱怨没有名为 gdcm 的模块.

有人遇到过吗?

解决方案

这意味着 python 在其环境中找不到 gdcm 包.所以你的包没有正确安装,和/或你的环境没有正确配置.请尝试以下操作:

  • 删除pipenv
  • 确保import gdcm"适用于正常"python 环境.

如果它不起作用,您知道问题出在(也)其他地方:

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?

解决方案

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:

这篇关于如何使用 Python 包装器安装 GDCM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-12 00:15