Python 如何让Theano在Mac Lion上运行?

Python 如何让Theano在Mac Lion上运行?,python,macos,theano,Python,Macos,Theano,我需要让Theano为一个学校项目在我的Mac电脑上操作。我从(表的第一行)下载了源代码,并将未修改的文件放入我学校项目的保留库中。我不知道这是否足够,所以我还使用了pip安装Theano。自从我得到这个后,一切似乎都很好: You are using pip version 6.1.1, however version 7.0.0 is available. You should consider upgrading via the 'pip install --upgrade pip' co

我需要让Theano为一个学校项目在我的Mac电脑上操作。我从(表的第一行)下载了源代码,并将未修改的文件放入我学校项目的保留库中。我不知道这是否足够,所以我还使用了
pip安装Theano
。自从我得到这个后,一切似乎都很好:

You are using pip version 6.1.1, however version 7.0.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Requirement already satisfied (use --upgrade to upgrade): Theano in ./anaconda/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6.2 in ./anaconda/lib/python2.7/site-packages (from Theano)
Requirement already satisfied (use --upgrade to upgrade): scipy>=0.11 in ./anaconda/lib/python2.7/site-packages (from Theano)
如你所见,我用的是蟒蛇

但是,当我在python控制台中运行测试时,会收到以下消息:

>>> import theano
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
>>> theano.test()
Theano version 0.7.0
theano is installed in /Users/usersos/anaconda/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano
NumPy version 1.9.2
NumPy is installed in /Users/usersos/anaconda/lib/python2.7/site-packages/numpy
Python version 2.7.9 |Anaconda 2.2.0 (x86_64)| (default, Dec 15 2014, 10:37:34) [GCC 4.2.1 (Apple Inc. build 5577)]
nose version 1.3.4
/Users/usersos/anaconda/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/misc/pycuda_init.py:34: UserWarning: PyCUDA import failed in theano.misc.pycuda_init
  warnings.warn("PyCUDA import failed in theano.misc.pycuda_init")
..........S.......S..S...S.S...................K.................E/Users/usersos/anaconda/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/compile/profilemode.py:103: UserWarning: DEPRECATION WARNING: The ProfileMode is deprecated. Use the Theano flags/parameter to theano.function 'profile=True' instead of 'mode=ProfileMode'
  "DEPRECATION WARNING: The ProfileMode is deprecated. Use the Theano"
.............................................................SSSSSS...SS.........S............................................................................S..................................................S......S.F.SS..SSSSSSSSSSSSSSSSSSSSS../Users/usersos/anaconda/lib/python2.7/site-packages/Theano-0.7.0-py2.7.egg/theano/sandbox/cuda/type.py:541: UserWarning: config.experimental.unpickle_gpu_on_cpu is set to True. Unpickling CudaNdarray as numpy.ndarray
  warnings.warn("config.experimental.unpickle_gpu_on_cpu is set to True. Unpickling CudaNdarray as numpy.ndarray")
.SSSSSSSSSSSS.....KK...................S.....SSSSS
有什么问题吗?Theano及其编译器是否安装良好?
我尝试了第一个示例,得到了相同的结果,没有任何错误。但我想知道如果我使用更复杂的函数和类,是否会有任何bug

您可能会选择Xcode命令行工具。另外,我会用自制软件安装一个合适的gcc工具链。然后使用pip(pip安装PyCUDA)安装PyCUDA,如果需要。此页面有一个很好的指南:如果您没有修复它,以下是安装说明:。它告诉你如何按照上面的评论安装编译后的软件。@fredrikhl谢谢你的链接。这是我对你建议的后续行动。有什么想法吗?