Python Theano中的属性错误

Python Theano中的属性错误,python,theano,Python,Theano,我正在尝试使用以下代码运行Theano的安装测试: import theano theano.test() 但是,我会看到与blas.py相对应的以下错误: /Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/theano/tensor/blas.py in default_blas_ldflags() 301 try: 302 #if numpy was linked w

我正在尝试使用以下代码运行Theano的安装测试:

 import theano
 theano.test()
但是,我会看到与blas.py相对应的以下错误:

/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/theano/tensor/blas.py in default_blas_ldflags()
    301     try:
    302         #if numpy was linked with library that are not installed, we can't reuse them.
--> 303         if all(not os.path.exists(dir) for dir in numpy.distutils.__config__.blas_opt_info['library_dirs']):
    304             return "-lblas"
    305         return ' '.join(

   AttributeError: 'module' object has no attribute '__config__' 
我知道AttributeError是一个著名的错误,有人对此提出疑问,但对于Theano,我在互联网上找到的唯一解决方案是添加:

import numpy.distutils.config

去死吧。但是,这并不能解决问题,我仍然面临属性错误。

这在无开发版本中已修复

使用这两个命令中的一个来更新Theano,具体取决于安装是针对您的用户还是针对操作系统:

pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git --user
pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
以下是该更新的文档:

http://www.deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions

“你的numpy是通过水蟒安装的吗?”詹姆斯敦:不是。它是通过热情的天篷安装的。