我用的是anaconda环境
直接用anaconda安装
下面 两条命令:
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
本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:python安装深度学习包theano,Pylearn2,scikit-neuralnetwork - Python技术站