Monday, January 4, 2010

pymix compilation errors on Ubuntu

pymix was a little tricky to compile. Here's what I did to get it working.

I downloaded and installed numpy [but that is probably not necessary].

Then I finally had to go into pymix's and change the location for where it was looking for arrayobject.h:
numpypath = prefix + '/lib/python' +pyvs + '/site-packages/numpy/core/include/numpy' # path to arrayobject.h
numpypath = '/usr/share/pyshared/numpy/core/include/numpy' # path to arrayobject.h

At this point, 'python build' worked, but the install failed with this error:

byte-compiling /usr/local/lib/python2.6/dist-packages/ to AminoAcidPropertyPrior.pyc
SyntaxError: ('invalid syntax', ('/usr/local/lib/python2.6/dist-packages/', 170, 14, ' as = alpha.pop(0)\n'))

turns out that 'as' is a reserved keyword in python 2.6, so you need to go in to that file and change it to something else, like: nada = alpha.pop(0)


Perry said...

thanks a lot.

illiwaii said...

Thank you very much. I have successfully compiled the pymix in my Linux Mint 9.

Alejandro Zabala said...

thanks a lot