神经网络模拟器Brian2的安装

来源:互联网 发布:鬼真实存在吗 知乎 编辑:程序博客网 时间:2024/05/17 22:21

官方指南:brian2.readthedocs.io/en/stable/introduction/install.html 或 http://briansimulator.org/

系统环境: ubuntu 16.04

依赖: Python 2.7

安装工具: pip

安装路线:

1. 从source安装Brain2

    sudo pip intall brain2

    (如果没有pip, apt-get intall -y python-pip)

    成功安装 brian2-2.1.2 mpmath-1.0.0 py-cpuinfo-3.3.0 sympy-1.1.1

2. 安装辅助工具包

    matplotlib (for plotting);

    nose (for running the testsuite);

     ipython

     jupyter-notebook (for an interactive console)

    安装jupyter遇到问题,看官网指导“http://jupyter.org/install.html”

3.  安装Brain2tool(用于模拟结果的可视化)

    sudo pip install brian2tools

    成功安装 brian2tools-0.2.1.1 pylems-0.4.9 setuptools-scm-1.15.6

4. 安装cython(写Cpython,优化计算)

    sudo -H pip install cython

5. 测试

    python

    import brian2

    brain.test()

    无警告无错误就说明安装成功,有skip可以。

    在我的安装过程中出现了GSL头文件缺失的问题,以及“warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++”警告,

    重新安装GSL库即可,命令如下:

    sudo apt-get install libgsl0-dev

    GSL(GNU Scientific Library)作为三大科学计算库之一,除了涵盖基本的线性代数,微分方程,积分,随机数,组合数,方程求根,多项式求根,排序等,

    还有模拟退火,快速傅里叶变换,小波,插值,基本样条,最小二乘拟合,特殊函数等(具体参考:www.cnblogs.com/nju2014/p/5334928.html)