2015-09-07 121 views
1

我無法在anaconda python中使用netCDF4。當我「導入netCDF4」時,出現以下錯誤:/home/myusrname/anaconda/lib/./libk5crypto.so.3:符號k5_buf_free,版本krb5support_0_MIT未在文件libkrb5support.so.0中用鏈接時間參考定義。無法在anaconda python中使用netcdf4

netCDF4模塊一直工作得很好,直到我安裝pyart(天氣雷達可視化軟件),由於某種原因,它想重新安裝netCDF4。另一個線程描述了這個問題(https://stackoverflow.com/questions/32050441/unable-to-use-netcdf4-within-python-anaconda),儘管解決方案是擦除並重新安裝anaconda。有誰知道另一種解決方法?謝謝!

回答

1

我有同樣的問題,甚至完全卸載並重新安裝Anaconda發行版並沒有解決它。看起來像使用「conda」來安裝netCDF4現在在錯誤的地方查找krb庫。

在最近更新到版本1.1.7的netCDF4代碼後,我能夠得到它的工作。這是從他們的網站(https://github.com/Unidata/netcdf4-python)更新信息:

3/19/2015: Version 1.1.7 released. Global Interpreter Lock (GIL) now released >when extension module calls C library for read operations. This speeds up >concurrent reads when using threads. Users who wish to use netcdf4-python >inside threads should read http://www.hdfgroup.org/hdf5-quest.html#gconc >regarding thread-safety in the HDF5 C library. Fixes to setup.py now ensure >that pip install netCDF4 with export USE_NCCONFIG=0 will use environment >variables to find paths to libraries and include files, instead of relying >exclusively on the nc-config utility.

在此之後,我設置環境變量「USE_NCCONFIG = 0」,然後用「點子」來安裝,而不是「暢達」 netCDF4。這終於得到它的工作。希望這也適用於你(或者你已經修復了它......)。