我用的是anaconda环境

直接用anaconda安装

下面 两条命令:

anaconda search -t conda 包名
conda install -c https://conda.anaconda.org/conda-forge 包名
 

python2.7

1. 安装numpy, scipy, theano:

conda install -c https://conda.anaconda.org/conda-forge numpy

conda install -c https://conda.anaconda.org/conda-forge scipy

conda install -c https://conda.anaconda.org/conda-forge theano

 

2.安装Pylearn2

   conda install -c https://conda.anaconda.org/conda-forge Pylearn2

 

3.安装scikit-neuralnetwork

git clone https://github.com/aigamedev/scikit-neuralnetwork.git

cd scikit-neuralnetwork

python setup.py develop

 4.测试

conda install -c https://conda.anaconda.org/conda-forge nose

nosetests -v sknn.tests

结果报错:

 

======================================================================
ERROR: Failure: ImportError (cannot import name downsample)
----------------------------------------------------------------------
Traceback (most recent call last):
  File"/usr/lib/python2.7/dist-packages/nose/loader.py", line 418, inloadTestsFromName
    addr.filename,addr.module)
  File"/usr/lib/python2.7/dist-packages/nose/importer.py", line 47, inimportFromPath
    returnself.importFromDir(dir_path, fqname)
  File"/usr/lib/python2.7/dist-packages/nose/importer.py", line 94, inimportFromDir
    mod =load_module(part_fqname, fh, filename, desc)
  File"/home/kevin/scikit-neuralnetwork/sknn/tests/__init__.py", line 1,in
    from sknn.backend importlasagne
  File"/home/kevin/scikit-neuralnetwork/sknn/backend/lasagne/__init__.py",line 5, in
    from .mlp importMultiLayerPerceptronBackend
  File"/home/kevin/scikit-neuralnetwork/sknn/backend/lasagne/mlp.py",line 25, in
    import lasagne.layers
  File"/usr/local/lib/python2.7/dist-packages/lasagne/__init__.py", line19, in
    from . import layers
  File"/usr/local/lib/python2.7/dist-packages/lasagne/layers/__init__.py",line 7, in
    from .pool import *
  File"/usr/local/lib/python2.7/dist-packages/lasagne/layers/pool.py",line 6, in
    from theano.tensor.signalimport downsample
ImportError: cannot import name downsample

----------------------------------------------------------------------

 

 

 

解决办法:

从开发模式安装lasagne

git clone https://github.com/Lasagne/Lasagne.git
cd Lasagne
python setup.py install
 
测试通过