I'm new to hmmlearn and am trying to use the Jupyter Notebook to work through this Gaussian HMM of stock data example. However, when I run the following code, I get an error.
from __future__ import print_function
import datetime
import numpy as np
from matplotlib import cm, pyplot as plt
from matplotlib.dates import YearLocator, MonthLocator
try:
from matplotlib.finance import quotes_historical_yahoo_ochl
except ImportError:
# For Matplotlib prior to 1.5.
from matplotlib.finance import (
quotes_historical_yahoo as quotes_historical_yahoo_ochl
)
from hmmlearn.hmm import GaussianHMM
print(__doc__)
The error is as follows:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-02bbde14d4d4> in <module>()
14 )
15
---> 16 from hmmlearn.hmm import GaussianHMM
17
18
ModuleNotFoundError: No module named 'hmmlearn'
I have spent a while searching the Internet and trying to find out why this is happening. I've ensured that I've downloaded the dependencies (scikit-learn, numpy and scipy), and I've run pip install -U --user hmmlearn
, both via the Windows cmd and as mentioned here. However, I keep getting the same error. I'm not sure if it may be something to do with the location of the different packages on my computer (I'm using Windows).
Does anyone have suggestions on what I could try to solve this? (My main aim is just to be able to get set up with hmmlearn so that I can start using it to explore HMMs.)