hmmlearn: ImportError: cannot import name hmm

Hi,

I used the hmm module from sklearn and tried to replace it by the hmmlearn module. Unfortunately I could not import it to my notebook.

from hmmlearn import hmm --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-7-8b8c029fb053> in <module>() ----> 1 from hmmlearn import hmm

ImportError: cannot import name hmm

I tried first pip-3.3 install git+https://github.com/hmmlearn/hmmlearn.git

As this didn’t work I cloned the project and run the setup.py (with python 3.3) but I still get an import error.

If I try to import

import hmmlearn.hmm

I get another error

ImportError Traceback (most recent call last) <ipython-input-8-8dbb2cfe75b2> in <module>() ----> 1 import hmmlearn.hmm

/home/ipython/python/lib/python3.3/site-packages/hmmlearn/hmm.py in <module>() 22 from sklearn import cluster 23 ---> 24 from .utils.fixes import log_multivariate_normal_density 25 26 from . import _hmmc

ImportError: No module named 'hmmlearn.utils'

What did I do wrong?

Cheers, Evelyn

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 22 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks Gael,

Using : conda install -c omnia hmmlearn works perfectly now ! But I don’t get it, is it from sk learn library ? Because the syntax is exactly the same.

Thank’s again 😃