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 setup.py and change the location for where it was looking for arrayobject.h:
From:
numpypath = prefix + '/lib/python' +pyvs + '/site-packages/numpy/core/include/numpy' # path to arrayobject.h
To:
numpypath = '/usr/share/pyshared/numpy/core/include/numpy' # path to arrayobject.h

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

byte-compiling /usr/local/lib/python2.6/dist-packages/AminoAcidPropertyPrior.py to AminoAcidPropertyPrior.pyc
SyntaxError: ('invalid syntax', ('/usr/local/lib/python2.6/dist-packages/AminoAcidPropertyPrior.py', 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)

3 comments:

Perry said...

thanks a lot.

illiwaii said...

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

Unknown said...

thanks a lot