pip可安装的嵌套扩展模块,由pipnest生成。
cereb-nest的Python项目详细描述
仙人掌巢
pip可安装的嵌套扩展模块,由pipnest生成。在
安装说明
使用pip
当通过pip安装时,该模块是在python外部使用CMake构建的 这意味着pip无法跟踪实际的安装状态。到 卸载并重新安装请参见Uninstallation。在
- 在
按照此处提供的说明安装NEST(https://www.nest-simulator.org/)
在 - 在
使用pip安装
在
pip install cereb_nest --no-cache-dir
- 导入nest后加载模块:
卸载
要卸载此模块,请使用pip uninstall cereb_nest
并删除
^位于您的nest安装中的lib/nest/
目录中的{
使用CMake
- 导出包含NEST安装目录的环境变量。E、 g.:
export NEST_INSTALL_DIR=$HOME/nest-simulator-install
- 将此GitHub存储库克隆到嵌套源和构建目录之外的目录中。E、 g.:
cd $HOME
git clone https://github.com/dbbs-lab/cereb-nest/
- 移动到cereb nest目录并创建一个新文件夹,您将在其中构建扩展模块
cd cereb-nest
mkdir build
cd build
- 运行以下CMake命令(用CMake 3.2.2测试)
cmake -Dwith-nest=${NEST_INSTALL_DIR}/bin/nest-config ../cereb_nest
结果输出应类似于:
[...]
-------------------------------------------------------
You can now build and install 'cerebmodule' using
make
make install
The library file libcerebmodule.so will be installed to
/home/alberto/nest-simulator-install/lib/nest
Help files will be installed to
/home/alberto/nest-simulator-install/share/doc/nest
The module can be loaded into NEST using
(cerebmodule) Install (in SLI)
nest.Install('cerebmodule') (in PyNEST)
The module will be installed into a non-default location!
Make sure to set the environment variables:
export NEST_MODULE_PATH=/home/alberto/nest-simulator-install/lib/nest:$NEST_MODULE_PATH
export SLI_PATH=/home/alberto/nest-simulator-install/share/nest/sli:$SLI_PATH
[...]
- 执行由CMake命令生成的最后两行。在
export NEST_MODULE_PATH=/home/alberto/nest-simulator-install/lib/nest:$NEST_MODULE_PATH
export SLI_PATH=/home/alberto/nest-simulator-install/share/nest/sli:$SLI_PATH
每次终端关闭时,应重复此通道。可以在.bashrc中添加这两行,以避免每次都这样做。在
- 制作并安装模块
make
make install
- 每次需要该模块时,可以按以下方式安装:
- 现在可以使用这个嵌套模块中包含的所有节点和突触。在
- 项目
标签: