Hello,
I have been trying NEST under the WSL in Windows and I am glad to say that it works! I think that getting NEST working correctly under the WSL may attract more users, to both NEST and the WSL. BTW (this is a side note), I have noticed that some Python codes (unrelated to NEST) run a little faster (15-20%) under the WSL than in Windows itself.
Anyway, nest works perfectly on the WSL using either Spyder as IDE or JupyterLab. However, after a while the installation breaks. After doing any upgrade via "conda upgrade --all" (once it was NEST itself updated), when I try to import NEST I get the error transcribed below, which ends in "ImportError: libgsl.so.25: cannot open shared object file: No such file or directory". I have narrowed down the problem to this: when installing NEST, the package "conda-forge::gsl-2.7-he838d99_0" is installed along. Then, if I do any "conda update --all" (or I guess that if I install any other package that uses gsl), the package gets updated "conda-forge::gsl-2.7-he838d99_0 --> pkgs/main::gsl-2.7.1-h6e86dc7_1". Then here: https://nest-simulator.org/mailinglist/hyperkitty/list/users@nest-simulator.... I found out that "If you upgrade your environment, you might have to cmake and compile NEST anew in order for it to pick up the new version.". So I thought that a force-reinstall of nest might do the trick, but it didn't. Moreover, I did the following: - start a new, clean environment - install gsl before nest (I got main::gsl-2.7.1-h6e86dc7_1) - then install nest-simulator.
But the error appears again.
FINALLY, I did "conda install conda-forge::gsl", it picked gsl-2.7-he838d99_0 and now NEST works again!! So it seems that the problem is specific with gsl-2.7.1 (and/or whatever version is in main?).
I don't want to end up using NEST in a frozen environment where nothing can be added or changed, neither before nor after installing NEST. Although I found the workaround, I guess you may find a way of this not happening at all.
Thank you and best regards
Patricio.
In [1]: import nest --------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import nest
File ~/miniconda3/lib/python3.12/site-packages/nest/__init__.py:64 61 import sys # noqa 62 import types # noqa ---> 64 from .ll_api_kernel_attributes import KernelAttribute # noqa 66 try: 67 import versionchecker # noqa: F401
File ~/miniconda3/lib/python3.12/site-packages/nest/ll_api_kernel_attributes.py:22 1 # -*- coding: utf-8 -*- 2 # 3 # ll_api_kernel_attributes.py (...) 19 # You should have received a copy of the GNU General Public License 20 # along with NEST. If not, see http://www.gnu.org/licenses/. ---> 22 from .ll_api import spp, sps, sr, stack_checker 25 class KernelAttribute: 26 """ 27 Descriptor that dispatches attribute access to the nest kernel. 28 """
File ~/miniconda3/lib/python3.12/site-packages/nest/ll_api.py:53 48 # Make MPI-enabled NEST import properly. The underlying problem is that the 49 # shared object pynestkernel dynamically opens other libraries that open 50 # yet other libraries. 51 sys.setdlopenflags(os.RTLD_NOW | os.RTLD_GLOBAL) ---> 53 from . import pynestkernel as kernel # noqa pylint: disable=no-name-in-module 55 __all__ = [ 56 "check_stack", 57 "connect_arrays", (...) 69 "take_array_index", 70 ] 73 engine = kernel.NESTEngine()
ImportError: libgsl.so.25: cannot open shared object file: No such file or directory