nansencenter / DAPPER

Data Assimilation with Python: a Package for Experimental Research
https://nansencenter.github.io/DAPPER
MIT License
348 stars 123 forks source link

Problem with examples on jupyter lab and python 3.9 on anaconda #86

Closed manueluc3 closed 2 years ago

manueluc3 commented 2 years ago

Hi I use anaconda with python 3.9 env and after install for development dapper I execute the example basic_1.py and give me a missing attribute error 'openblas_get_config' DAPPER-master>python examples/basic_1.py Traceback (most recent call last): File "C:\Users\ManuelJoséLazo\Downloads\DAPPER-master\examples\basic_1.py", line 13, in import dapper.da_methods as da File "c:\users\manueljosélazo\downloads\dapper-master\dapper\da_methods__init.py", line 195, in from .ensemble import LETKF, SL_EAKF, EnKF, EnKF_N, EnKS, EnRTS File "c:\users\manueljosélazo\downloads\dapper-master\dapper\da_methods\ensemble.py", line 8, in import dapper.tools.multiproc as multiproc File "c:\users\manueljosélazo\downloads\dapper-master\dapper\tools\multiproc.py", line 15, in threadpoolctl.threadpool_limits(1) File "C:\ProgramData\Anaconda3\envs\dapper\lib\site-packages\threadpoolctl.py", line 501, in init self._original_limits = _set_threadpool_limits( File "C:\ProgramData\Anaconda3\envs\dapper\lib\site-packages\threadpoolctl.py", line 182, in _set_threadpool_limits modules = _load_modules(prefixes=prefixes, user_api=user_api) File "C:\ProgramData\Anaconda3\envs\dapper\lib\site-packages\threadpoolctl.py", line 271, in _load_modules return _find_modules_with_enum_process_module_ex( File "C:\ProgramData\Anaconda3\envs\dapper\lib\site-packages\threadpoolctl.py", line 444, in _find_modules_with_enum_process_module_ex _get_module_info_from_path(filepath, prefixes, user_api, File "C:\ProgramData\Anaconda3\envs\dapper\lib\site-packages\threadpoolctl.py", line 318, in _get_module_info_from_path modules.append(_make_module_info(filepath, info, prefix)) File "C:\ProgramData\Anaconda3\envs\dapper\lib\site-packages\threadpoolctl.py", line 307, in _make_module_info version=_get_version(dynlib, internal_api)) File "C:\ProgramData\Anaconda3\envs\dapper\lib\site-packages\threadpoolctl.py", line 229, in _get_version return _get_openblas_version(dynlib) File "C:\ProgramData\Anaconda3\envs\dapper\lib\site-packages\threadpoolctl.py", line 252, in _get_openblas_version get_config = getattr(openblas_dynlib, "openblas_get_config") File "C:\ProgramData\Anaconda3\envs\dapper\lib\ctypes\init.py", line 395, in getattr func = self.getitem(name) File "C:\ProgramData\Anaconda3\envs\dapper\lib\ctypes\init.py", line 400, in getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: function 'openblas_get_config' not found

Maybe I have to install some python module more? Im executing on jupyter lab. Im not expert on python, by the way. Best regards, Manuel

patnr commented 2 years ago

Could you try commenting out this line ?

manueluc3 commented 2 years ago

Thank you very much. That comment on that line fix the issue. I paste some snapshoot Now I can also run other examples in jupyter lab. Nice!

patnr commented 2 years ago

Cool! I'm not sure what the root cause here is (best guess: some form of version incompatibility with your Windows), so the fix is only a workaround. It might cause some things to be a bit slower, but for most purposes it should not matter much.