emissions-api / sentinel5algorithms

Sentinel-5(P) Algorithms
MIT License
6 stars 3 forks source link

Importing s5a on Windows #28

Open sehHeiden opened 4 years ago

sehHeiden commented 4 years ago

It is not quite simple to install s5a on windows, because it uses h3. After a long time of attempting to install h3 on windows and than s5a.

I wanted to start and try out s5a and found the error:

caused by:

import s5a

Error:

OSError Traceback (most recent call last)

in 5 import pandas as pd 6 import certifi ----> 7 import s5a 8 ~\Anaconda3\envs\Sentinel5\lib\site-packages\s5a\__init__.py in 10 import numpy 11 import pandas ---> 12 from h3 import h3 13 14 ~\Anaconda3\envs\Sentinel5\lib\site-packages\h3\h3.py in 41 '{}/{}'.format(_dirname, 'out/libh3.so.1'))) 42 ---> 43 libh3 = cdll.LoadLibrary(libh3_path) 44 45 # Type of an H3 index ~\Anaconda3\envs\Sentinel5\lib\ctypes\__init__.py in LoadLibrary(self, name) 440 441 def LoadLibrary(self, name): --> 442 return self._dlltype(name) 443 444 cdll = LibraryLoader(CDLL) ~\Anaconda3\envs\Sentinel5\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error) 362 363 if handle is None: --> 364 self._handle = _dlopen(self._name, mode) 365 else: 366 self._handle = handle OSError: [WinError 126] Das angegebene Modul wurde nicht gefunden

Meaning that the module was not found. I already was so far not to use s5a at all and only use netCDF, but I can't really find the data in that file...

In found the keys in nc.groups['PRODUCT'].variables

But I am unable to find the data so far...

shaardie commented 4 years ago

@Meresmata You can take a look here to see how the files are loaded.

sehHeiden commented 4 years ago

Thanks so far....

I found out so far: only import h3 works for me but not the statement from h3 import h3.

Don't have the problem on Linux. (Do you know why? I don't.)

Probably gonna use s5a with my worse linux pc and than pickle the data and than use the pickled data on the stronger windows machine...

shaardie commented 4 years ago

So there seem to be problems with H3 and Windows, see https://github.com/uber/h3-py/issues/32. Maybe you find more information about it there.

Another thing you could try, if you want to use your Windows machines is using the Windows-Subsystem für Linux and import your nc files there. I actually never worked with it, but maybe it will solve your problems.