nansat
nansat copied to clipboard
When I run the sea_ice_drift simple.py sample code, I get an error like this:
C:\software\Anaconda3\envs\nansat3.9\python.exe D:\Python_code\sea_ice_drift-master\examples\simple1.py DLL load failed while importing pixfun_py3: 找不到指定的模块。 C:\software\Anaconda3\envs\nansat3.9\lib\site-packages\nansat-1.5.3-py3.9-win-amd64.egg\nansat_init.py:30: UserWarning: Cannot register C pixel functions! Either nansat was not installed using setup.py or pixel functions were not compiled automatically. For development, use "python setup.py build_ext --inplace" to compile pixel functions manually into the source tree.
warnings.warn('''Cannot register C pixel functions!
Cannot add landmask
VMIN: -22.628240203857423
VMAX: -9.868122138977043
Cannot add landmask
VMIN: -23.267868041992188
VMAX: -10.92607064247131
96% 00368.7 00054.9 00388.0 00091.0 +00.0 0.84 13.59
Pattern matching - OK! ( 2 sec)
Traceback (most recent call last):
File "D:\Python_code\sea_ice_drift-master\examples\simple1.py", line 69, in
It looks like the pixel manipulation functions of nansat were not compiled during the installation. There was an issue with the package metadata that might have caused this. It has been fixed in nansat 1.6.2. The issue with the pixel functions might also come from your environment. You need to have a C compiler and GDAL installed.
Here are some steps you can take to try and fix this:
- make sure you have a C compiler installed
- make sure GDAL is installed (the easiest way to do this is through Anaconda, which you seem to be using)
- install nansat version 1.6.2 (
pip install nansat==1.6.2
) - try again to execute the code sample from sea_ice_drift