I am trying to download pomegranate to do Hidden Markov Model but it fails.
Hey,
What error message are you getting?
ModuleNotFoundError Traceback (most recent call last)
Cell In[7], line 3
1 import pandas as pd
2 import numpy as np
----> 3 from hmmlearn import hmm
4 from sklearn.preprocessing import StandardScaler
5 import matplotlib.pyplot as plt
ModuleNotFoundError: No module named ‘hmmlearn’
Also, evaluate what went wrong and consider options for how to fix it. Break the execution up into cell blocks
This code snippet installs the ‘pomegranate’ library version 0.14.7 for use in regime switching models.
1
2
3
First, let’s try installing the ‘pomegranate’ library as an alternative for regime switching models
%pip install pomegranate==0.14.7
print(“pomegranate module installed.”)
{1 Items
“outputs_dict”
:
{
…
}40 Items
}
The installation of the pomegranate
module also encountered issues due to a compilation error. This is likely related to the build environment or dependencies.
Given these challenges, we can consider the following options:
- Use a Different Environment: Try installing the package in a different environment or on a local machine where you have more control over the dependencies and compiler settings.
- Alternative Libraries: Explore other libraries or methods for regime switching models, such as using statistical models available in
statsmodels
or implementing a custom solution. - Simplified Approach: Continue with the simplified moving average crossover strategy we used earlier, which provides a basic classification of market regimes.
Let me know how you would like to proceed!
tyvm
Hmmm… okay. I’ve tried using mamba to install it but its giving me a ‘subprocess’ issue. Maybe one of the engineers can give us a better idea on what’s going on. Before that, I’m going to try another thing.
Hi everyone!
Thanks for reporting @zorba.the.buddhah! Also, thanks for the response @chrisdavis92. I’ve relayed the issue to the engineering team to take a look at it. Hope to have a resolution soon!
Hey everyone!
Thanks for your patience! The engineers recommended when downloading packages or any of the sorts, you can switch to ‘Lean Python’:
Let me know if this works for you!
Thanks @Alysha, this helps!