【发布时间】:2017-10-21 06:20:55
【问题描述】:
我一直在尝试在 MacOS Sierra (10.12.3) 上的 Anaconda (Jupyter) 中安装 Lasagne 和 Theano 以使用此神经网络:neural-storyteller
但是,当我尝试在 Jupyter 中导入它们时:
import lasagne
import theano
我收到此错误:
ImportError Traceback (most recent call last)
<ipython-input-2-7d877a974cd7> in <module>()
----> 1 import lasagne
2 import theano
//anaconda/lib/python2.7/site-packages/lasagne/__init__.py in <module>()
11 section 'Install from PyPI' in the installation docs for more details:
12 http://lasagne.readthedocs.org/en/latest/user/installation.html#install-from-pypi
---> 13 """)
14 else:
15 del theano
ImportError: Could not import Theano.
Please make sure you install a recent enough version of Theano. See
section 'Install from PyPI' in the installation docs for more details:
http://lasagne.readthedocs.org/en/latest/user/installation.html#install-from-pypi
我的猜测是我在不同版本的 python 上安装了 Theano,因为当我制作一个普通的 python 文件 (.py) 并导入 lasagne 和 theano 时,它们可以工作。此外,当我查看用户目录中的 anaconda 文件夹时,没有 theano 文件夹,但 miniconda2 文件夹中有一个(/Users/Pit/miniconda2/pkgs/theano-0.9.0-py27_0)。 我可以只使用 .py 文件,但我还需要 caffe 库,我只能使用 Anaconda python。
有人知道如何安装适用于 Anaconda (Jupyter) 的正确版本的 theano 吗? 任何帮助将不胜感激
【问题讨论】:
标签: python neural-network theano caffe lasagne