Theano for mac installation notes

This is a post summarizing my experience with installing then, a machine learning package, on my mac.

My mac OS X version is 10.10.1

Theano version is 0.6 with EPD.

At first, I installed EPD with an academic license following the instruction here

http://deeplearning.net/software/theano/install.html, (In academia: Enthought Python Distribution (EPD)).

However, I soon run into a series of error messages when I try to

import theano,

the error messages state that it can’t find certain instructions

++: warning: couldn’t understand kern.osversion ‘14.0.0

/var/folders/j3/m5j5nv0s6gx9_j465t668_4m0000gn/T//ccz3y28a.s:30:no such instruction: `vcvtsi2sdq %rax, %xmm1,%xmm1′

/var/folders/j3/m5j5nv0s6gx9_j465t668_4m0000gn/T//ccz3y28a.s:33:no such instruction: `vcvtsi2sd %eax, %xmm0,%xmm0′

/var/folders/j3/m5j5nv0s6gx9_j465t668_4m0000gn/T//ccz3y28a.s:34:no such instruction: `vmovsd LC0(%rip), %xmm2′

/var/folders/j3/m5j5nv0s6gx9_j465t668_4m0000gn/T//ccz3y28a.s:35:no such instruction: `vdivsd %xmm2, %xmm0,%xmm0′

/var/folders/j3/m5j5nv0s6gx9_j465t668_4m0000gn/T//ccz3y28a.s:36:no such instruction: `vaddsd %xmm0, %xmm1,%xmm0′

/var/folders/j3/m5j5nv0s6gx9_j465t668_4m0000gn/T//ccz3y28a.s:37:no such instruction: `vmovsd %xmm0, -32(%rbp)’

/var/folders/j3/m5j5nv0s6gx9_j465t668_4m0000gn/T//ccz3y28a.s:49:no such instruction: `vmovsd -32(%rbp), %xmm0′

…..

I googled around and found this post most relevant

https://groups.google.com/forum/#!topic/theano-users/iNNxMqDIJjY, following the link  there to this page (https://github.com/Theano/Theano/issues/1650).

The issue is the architecture flag is not set right. In order to get Theano to work, we have to override the flax in .theanorc file.

By default, there is no .theanorc file and it should be in the $HOME/ directory. So I created the file. I found the flag in “g++ … -march=corei7-acx…”, so I know my architecture should be “core”.

I created the following .theanorc file following the instruction

[gcc] cxxflags=-march=corei7.

After I did this, I got rid of the unknown instruction issues. But, a warning now appears overtime I import Theano

“WARNING (theano.gof.cmodule): WARNING: your Theano flags `gcc.cxxflags` specify an `-march=X` flags.       It is better to let Theano/g++ find it automatically, but we don’t do it now”

I think this is OK. However, I soon run into another weird problem with the following error message

“g++: warning: couldn’t understand kern.osversion ‘14.0.0

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

collect2: error: dsymutil returned 69 exit status

Traceback (most recent call last):

File “<stdin>”, line 1, in <module>

File “/Library/Python/2.7/site-packages/theano/__init__.py”, line 55, in <module>

from theano.compile import \

The problem is that I just installed the OS X command line tools for Theano. But I have not yet opened my Xcode to accept the agreement. I did that and the errors go away.

Advertisements
This entry was posted in Convoluted Neural Nets. Bookmark the permalink.

2 Responses to Theano for mac installation notes

  1. v says:

    this is cool. I’ve got the same problem. fixed thanks to your comment

  2. Pingback: theano on Mac OSX fails using g++ | Your Speech Is 3.0

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s