Closed RobertaMLo closed 1 year ago
This error only occurs with NEST v3.0 or higher. Can you import nest
and show me the output? It should show the version
-- N E S T --
Copyright (C) 2004 The NEST Initiative Version: master@bb43f8ae1 Built: Jan 23 2023 12:39:05 This program is provided AS IS and comes with NO WARRANTY. See the file LICENSE for details. Problems or suggestions? Visit https://www.nest-simulator.org
or with import nest and nest.version I get master@bb43f8ae1
The commit SHA comes from NEST 3.4, please double check your Python environment and NEST installation and make sure that your Python env only picks up the correct NEST 2.18 installation
Checked.
bcc@bcc02:~/.pyenv/versions/bsbpyenv/bin$ nest-config --version master@bb43f8ae1
that is the nest version installed as explained in bsb documentation: sudo apt-get update && apt-get install -y openmpi-bin libopenmpi-dev git clone https://github.com/dbbs-lab/nest-simulator cd nest-simulator mkdir build cd build pip install cmake cython cmake .. \ -Dwith-mpi=ON \ -Dwith-python=ON \ make install -j8
I double checked also LICENCE file in nest-simulator folder and It's version 2.
bcc@bcc02:~/.pyenv/versions/bsbpyenv/bin$ nest-config --version master@bb43f8ae1
This means your NEST version is 3.4, sorry! You'll have to remove it and triple check
Even if you are following the instructions, it is possible you are making other mistakes. For example, you could have different Python environments active during installation and during runtime. The best way to deal with this is probably to remove the installed NEST, confirm this by importing nest, and verifying that a ModuleNotFoundError: No module named 'nest'
is raised, and then trying to install the repository you cloned again.
I predict you won't be able to import nest at that point, meaning that you are not installing it where you think you are installing it.
I remove nest and now I get the following output (so I hope I removed correctly) (bsbpyenv) bcc@bcc02:~/projects/meanfield$ nest /home/bcc/.pyenv/versions/bsbpyenv/bin/nest: error while loading shared libraries: libsli_readline.so.3: cannot open shared object file: No such file or directory
I run the previous command to install nest from dbbs-lab repo on my Ubuntu 22.04.1, but i get the following error CMake Warning: Ignoring extra path from command line:
"install"
CMake Error: Unknown argument -j8 CMake Error: Run 'cmake --help' for all supported options.
I run the previous command to install nest from dbbs-lab repo on my Ubuntu 22.04.1, but i get the following error CMake Warning: Ignoring extra path from command line:
"install"
CMake Error: Unknown argument -j8 CMake Error: Run 'cmake --help' for all supported options.
You gave an incorrect command.
I remove nest and now I get the following output (so I hope I removed correctly)
There are still remains of the nest install. It may be better to try this in a new pyenv
I fix the command but when I run the test
python -c "import nest; nest.test()"
and now I get
File "<string>", line 1, in <module>
File "/home/bcc/.pyenv/versions/bsbpyenv/lib/python3.10/site-packages/nest/__init__.py", line 53, in <module>
from .ll_api import KernelAttribute # noqa
File "/home/bcc/.pyenv/versions/bsbpyenv/lib/python3.10/site-packages/nest/ll_api.py", line 76, in <module>
take_array_index = engine.take_array_index
AttributeError: 'pynestkernel.NESTEngine' object has no attribute 'take_array_index'
python: /home/bcc/projects/meanfield/nest-simulator/nestkernel/kernel_manager.h:206: static nest::KernelManager& nest::KernelManager::get_kernel_manager(): Assertion `kernel_manager_instance_' failed.
Aborted (core dumped)
Now nest version is master@3a227fb2
I created a new env with local python 3.8 with pyenv with the following commands:
pyenv install 3.8
pyenv local 3.8.16
pyenv virtualenv 3.8.16 mytrialenv
then I checked to be in the correct environment with
pip -V
and I get
pip 22.0.4 from /home/bcc/.pyenv/versions/3.8.16/envs/mytrialenv/lib/python3.8/site-packages/pip (python 3.8)
Then I try
sudo apt-get update && apt-get install -y openmpi-bin libopenmpi-dev
git clone https://github.com/dbbs-lab/nest-simulator
cd nest-simulator
mkdir build
cd build
pip install cmake cython
cmake .. \
-Dwith-mpi=ON \
-Dwith-python=ON
make install -j8
but I get this error related to a not active virtual env:
Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease Hit:3 http://it.archive.ubuntu.com/ubuntu jammy InRelease Hit:4 http://it.archive.ubuntu.com/ubuntu jammy-updates InRelease Hit:5 http://it.archive.ubuntu.com/ubuntu jammy-backports InRelease Hit:6 https://packagecloud.io/AtomEditor/atom/any any InRelease Reading package lists... Done W: https://packagecloud.io/AtomEditor/atom/any/dists/any/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? fatal: destination path 'nest-simulator' already exists and is not an empty directory. mkdir: cannot create directory ‘build’: File exists Requirement already satisfied: cmake in /home/bcc/.pyenv/versions/3.8.16/envs/mytrialenv/lib/python3.8/site-packages (3.26.3) Requirement already satisfied: cython in /home/bcc/.pyenv/versions/3.8.16/envs/mytrialenv/lib/python3.8/site-packages (0.29.34) WARNING: You are using pip version 22.0.4; however, version 23.1.1 is available. You should consider upgrading via the '/home/bcc/.pyenv/versions/3.8.16/envs/mytrialenv/bin/python3.8 -m pip install --upgrade pip' command. -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) -- Host triple: x86_64-pc-linux -- Target triple: x86_64-pc-linux -- Found PythonInterp: /home/bcc/.pyenv/versions/mytrialenv/bin/python (found version "3.8.16") -- Found Cython: /home/bcc/.pyenv/versions/mytrialenv/bin/cython (found suitable version "0.29.34", minimum required is "0.28.3") -- Found LTDL: /usr/lib/x86_64-linux-gnu/libltdl.so -- Found Readline: /usr/lib/x86_64-linux-gnu/libreadline.so (found version "8.1") -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") -- Found GSL: /usr/include (found version "2.7.1") -- Found OpenMP_C: -fopenmp (found version "4.5") -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5") -- Found MPI_C: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so (found version "3.1") -- Found MPI_CXX: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so (found version "3.1") -- Found MPI: TRUE (found version "3.1") -- Found PY_mpi4py: /usr/lib/python3/dist-packages/mpi4py -- Check the abort exitcode. -- Check the abort exitcode. 134 -- Check the segmentation fault exitcode. -- Check the segmentation fault exitcode. 139 -- Check whether the compiler ignores cmath makros. -- Check whether the compiler ignores cmath makros. OFF -- Check whether the compiler does NOT include <.h> headers ISO conformant. -- Check whether the compiler does NOT include <.h> headers ISO conformant. OFF -- Check whether the compiler respects symbolic signal names in signal.h. -- Check whether the compiler respects symbolic signal names in signal.h. OFF -- Check static template member declaration. -- Check static template member declaration. OFF -- Check for STL vector capacity base unity. -- Check for STL vector capacity base unity. ON -- Check for STL vector capacity doubling strategy. -- Check for STL vector capacity doubling strategy. ON -- Check whether the compiler fails with ICE. -- Check whether the compiler fails with ICE. OFF -- Check if ::nan is available from cmath. -- Check if ::nan is available from cmath. ON -- Check if ::isnan is available from cmath. -- Check if ::isnan is available from cmath. ON
CMake Error at CMakeLists.txt:189 (message): Do not install into '/usr/local'. Please set -DCMAKE_INSTALL_PREFIX:PATH=.
-- Configuring incomplete, errors occurred! make: *** No rule to make target 'install'. Stop.
Do you have a suggested pipeline to create a virtual env with a local python version and to link it to a local folder?
Here my problem with bsbv3 installation:
Traceback (most recent call last): File "/home/bcc/projects/meanfield/CRBL_MF_Model/bsb_preprocessing/recursive_stim_MF.py", line 47, in
simulator = simulation.prepare()
File "/home/bcc/projects/meanfield/bsb/bsb/simulators/nest.py", line 355, in prepare
self.lock()
File "/home/bcc/projects/meanfield/bsb/bsb/simulators/nest.py", line 392, in lock
self.single_lock()
File "/home/bcc/projects/meanfield/bsb/bsb/simulators/nest.py", line 398, in single_lock
if hasattr(self.nest, _LOCK_ATTRIBUTE):
File "/usr/lib/python3.10/functools.py", line 981, in get
val = self.func(instance)
File "/home/bcc/projects/meanfield/bsb/bsb/simulators/nest.py", line 336, in nest
setattr(nest, _HOT_MODULE_ATTRIBUTE, set())
File "/home/bcc/.pyenv/versions/bsbpyenv/lib/python3.10/site-packages/nest/init.py", line 448, in _setattr_error
raise err from None
AttributeError: Cannot set attribute '_dbbs_scaffold_hot_modules' on module 'nest'. Did you mean: '_nest'?
I installed bsbv3 from github repo as well as nest-simulator following instructions of bsb documentation How can I fix this?