jmschrei / yahmm

Yet Another Hidden Markov Model repository.
MIT License
249 stars 32 forks source link

Add support for Python 3? #23

Closed tlnagy closed 10 years ago

tlnagy commented 10 years ago

Python 3 support would be really nice. Almost my entire tool set has transitioned to Python 3 except for yahmm. I will see if I can start putting something together this weekend.

jmschrei commented 10 years ago

My thoughts on Python3 can be described as the following: Ughhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.

My biggest concern is that I don't know how well Cython ports into Python3. I haven't tried at all ,but it's not just a simple replacement of the old terms with new terms.

adamnovak commented 10 years ago

It looks like Cython is quite happily available for Python 3. See < https://pypi.python.org/pypi/Cython/>.

On Wed, Jul 23, 2014 at 11:02 AM, Jacob Schreiber notifications@github.com wrote:

My thoughts on Python3 can be described as the following: Ughhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh.

My biggest concern is that I don't know how well Cython ports into Python3. I haven't tried at all ,but it's not just a simple replacement of the old terms with new terms.

— Reply to this email directly or view it on GitHub https://github.com/jmschrei/yahmm/issues/23#issuecomment-49911518.

jmschrei commented 10 years ago

This didn't work when running Travis using Python 3.2. Claimed there was a segfault. See #36

adamnovak commented 10 years ago

I suspect the problem is Travis not having all the modules installed. I observed segfaults when the Cython code tried to access a module that wasn't installed. Looks like I didn't import scipy in __init__.py to force the error to happen at the Python level, so that might be it.

Do the python-numpy and pyhton-scipy packages install Python 3 versions of those modules?

Can you turn on Travis building of PRs?

jmschrei commented 10 years ago

Travis does build the PRs. Yours passed because you only checked against 2.7, not 3.2. You'd need to edit the travis.yml file to include 3.2 like I did.

I don't know which version python-numpy installs-- I thought by specifying the version it would install the right version.

adamnovak commented 10 years ago

Yeah, look in the failing log where it installs python-numpy (1:1.6.1-6ubuntu1) and python-scipy (0.9.0+dfsg1-1ubuntu2) which both depend on python2.7 in the Ubuntu repos, and then builds matplotlib against numpy: yes [version 1.8.2] which is a different version than the one we just installed.

I'll mess about with the Travis settings and try again.

jmschrei commented 10 years ago

Should be fixed as of #37