从昨天开始,我一直在努力导入一些库,比如GDAL(或iris),而且我总是得到相同类型的输出。在
>>> import gdal
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "gdal.py", line 28, in <module>
_gdal = swig_import_helper()
File "gdal.py", line 24, in swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: dlopen(./_gdal.so, 2): Library not loaded: @rpath/libicui18n.56.dylib
Referenced from: /Users/zoran/anaconda/lib/libgdal.20.dylib
Reason: image not found
我在我的档案里找到了:
libicui18n
的文件2个包含_gdal.so
的文件
/Users/zoran/anaconda/pkgs/icu-54.1-0/lib/libicui18n.54.1.dylib
/Users/zoran/anaconda/lib/python2.7/site-packages/osgeo/_格达尔。索在
/库/框架/GDAL.framework/Versions/2版.1/Python/2.7/site-packages/osgeo/_格达尔。索
今天早上我可以毫无问题地导入gdal,但突然(我不知道我做了什么)这是完全不可能的。在
我试着: -卸载/安装gdal -卸载/安装anaconda并重新安装gdal -创建不同的新环境(在python2和python3中)并只安装gdal
我不知道这是什么,不知道。在
当我用上面路径的名称键入otool-L时,我得到:
^{pr2}$当我输入conda信息时:
platform : osx-64
conda version : 4.2.9
conda is private : False
conda-env version : 4.2.9
conda-build version : 2.0.2
python version : 2.7.12.final.0
requests version : 2.11.1
root environment : /Users/zoran/anaconda (writable)
default environment : /Users/zoran/anaconda
envs directories : /Users/zoran/anaconda/envs
package cache : /Users/zoran/anaconda/pkgs
channel URLs : https://conda.anaconda.org/anaconda/osx-64/
https://conda.anaconda.org/anaconda/noarch/
https://conda.anaconda.org/scitools/osx-64/
https://conda.anaconda.org/scitools/noarch/
https://conda.anaconda.org/conda-forge/osx-64/
https://conda.anaconda.org/conda-forge/noarch/
https://repo.continuum.io/pkgs/free/osx-64/
https://repo.continuum.io/pkgs/free/noarch/
https://repo.continuum.io/pkgs/pro/osx-64/
https://repo.continuum.io/pkgs/pro/noarch/
config file : /Users/zoran/.condarc
offline mode : False
我想知道是不是这些库保存在错误的目录中?在
我见过许多类似的问题,但没有解决问题的诀窍。在
谢谢你的帮助
我也有同样的问题。在
解决我的问题
我找到了解决问题的办法。在
感谢您对“ocefpaf”的明确解释:
^{pr2}$相关问题 更多 >
编程相关推荐