Tuesday, 15 October 2013

Pymix fix: short note on compiling PyMix on Ubuntu

A fix for users of Python 2.6 or 2.7 when installing PyMix:

# 3 steps
# 1) in setup.py
# change
from distutils.core import setup, Extension,DistutilsExecError
#to:
from distutils.core import setup, Extension
from distutils.errors import DistutilsExecError
# 2) in setup.py
# change
numpypath = prefix + '/lib/python' +pyvs + '/site-packages/numpy/core/include/numpy' # path to arrayobject.h
# to
# (locate arrayobject.h) - for me this path was
numpypath = '/usr/share/pyshared/numpy/core/include/numpy'
# Finally
# 3) in /usr/local/lib/python2.7/dist-packages/AminoAcidPropertyPrior.py
# change
as = alpha.pop(0) # (line 170)
# to
dummy = alpha.pop(0) # 'as' is a reserved keyword
view raw pymix_fix.py hosted with ❤ by GitHub

No comments: