我无法在 Mac OS X 10.10.5 上安装 Theano

I can't install Theano on Mac OS X 10.10.5

我正在尝试在我的 MacBookPro 上使用 Python 3.4 安装 Theano(以及随后的 pylearn2),Mac OS X 10.10.5。我有 Anaconda,我遵循 Theano 文档中报告的说明 (http://deeplearning.net/software/theano/install.html)。我必须使用 sudo -H pip 命令并下载 Theano,在 anaconda 中创建了一个 Theano 文件夹,并且所有必需的依赖项都满足版本要求。但是,当我写

import theano

Python 中的命令,我得到(在终端和 ipython-qtconsole 中)如下:

Traceback (most recent call last):

File "", line 1, in

File "/Users/davidefloriello/anaconda/lib/python3.4/site-packages/theano/init.py", line 44, in from theano.gof import \

File "/Users/davidefloriello/anaconda/lib/python3.4/site-packages/theano/gof/init.py", line 38, in from theano.gof.cc import \

File "/Users/davidefloriello/anaconda/lib/python3.4/site-packages/theano/gof/cc.py", line 64, in from theano.gof import link

File "/Users/davidefloriello/anaconda/lib/python3.4/site-packages/theano/gof/link.py", line 12, in from theano.gof.type import Type

File "/Users/davidefloriello/anaconda/lib/python3.4/site-packages/theano/gof/type.py", line 14, in from theano.gof.op import CLinkerObject

File "/Users/davidefloriello/anaconda/lib/python3.4/site-packages/theano/gof/op.py", line 31, in from theano.gof.cmodule import GCC_compiler

File "/Users/davidefloriello/anaconda/lib/python3.4/site-packages/theano/gof/cmodule.py", line 37, in from theano.gof.compiledir import gcc_version_str, local_bitwidth

File "/Users/davidefloriello/anaconda/lib/python3.4/site-packages/theano/gof/compiledir.py", line 259, in in_c_key=False)

File "/Users/davidefloriello/anaconda/lib/python3.4/sitepackages/theano/configparser.py", line 237, in AddConfigVar configparam.get()

File "/Users/davidefloriello/anaconda/lib/python3.4/site-packages/theano/configparser.py", line 279, in get self.set(None, val_str)

File "/Users/davidefloriello/anaconda/lib/python3.4/site-packages/theano/configparser.py", line 290, in set self.val = self.filter(val)

File "/Users/davidefloriello/anaconda/lib/python3.4/site-packages/theano/gof/compiledir.py", line 185, in filter_compiledir " or listing permissions." % path) ValueError: compiledir '/Users/davidefloriello/.theano/compiledir_Darwin-14.5.0-x86_64-i386-64bit-i386-3.4.3-64' exists but you don't have read, write or listing permissions.

最后一行非常令人惊讶,因为我是唯一的管理员。我查看了另一个问题 How to install theano library on OS X? 但我发现它不是很有用,因为我们的 Python 版本不同而且在我看来我的问题不那么模糊。

非常感谢任何帮助!

非常感谢,

大卫

发现报告了类似的问题 here。针对不同用户更新的解决方案是:

Try and remove that '/Users/davidefloriello/.theano/' directory and run Python again without sudo.