我在我的python脚本中写import mahotas as mt
。我得到错误ImportError: No module named mahotas
所以我用这个命令来安装
$ sudo -H pip install mahotas
但它给了我以下错误
Requirement already satisfied: mahotas in /usr/local/lib/python3.5/dist-packages (1.4.5)
Requirement already satisfied: numpy in /usr/local/lib/python3.5/dist-packages (from mahotas) (1.16.2)
我不知道这里发生了什么。
你用什么代码?如果是Spyder,请尝试在工具中选择PYTHONPATH。添加/usr/local/lib/python3.5/dist-packages的路径