Open tdhopper opened 5 years ago
Ran the following bash snippet in my anaconda python's site-packages directory:
~/anaconda3/lib/python3.6/site-packages$
FILES=$(find pyhsmm pybasicbayes -name "*.py")
for FILE in $FILES
do
echo $FILE
sed -i s/"from scipy.misc import logsumexp"/"from scipy.special import logsumexp"/g $FILE
done
python -c "import pyhsmm" # Should work now
@satpreetsingh Condolences.
hello to all,
I am trying to set up the pyhsmmon
my Windows x64 (python3.6), but when I tyr to run the examples, I get:
ImportError: No module named 'hmm_messages_interface'
colud you give me your environment?
This is still an issue when installing from pip as of 04/08/2020, but is fixed when install from the git repo.
@Wusir2018 are you installing from pip or from the git repo? If the latter, what compiler are you using? I saw similar issues when trying to install from the repo due to this issue. Try applying the fix suggested there to pyhssm/internals/util.h then installing again.
Hi @johnmbarrett,
I installed from pip
.
Thank you for you reply! I am so sorry about reply you late.
I gave up using this project because I didn't install it successfully.
Thank you very much! I will try it from git
again!
I solved the issue by brute force. First I downloaded the package from Github on my laptop. Then I replaced from scipy.misc import logsumexp
with from scipy.special import logsumexp
in the following files: \pyhsmm\models.py \pybasicbayes\util\stats.py \pybasicbayes\distributions\negativebinomial.py \pybasicbayes\models\mixture.py. In the command prompt of windows python setup.py install
. My set up is Windows 10 with Python 3.9.5.
hey @KristanRomano would you be willing to write and submit a PR incorporating the changes you made?
@mathDR I am actually pretty new to python and github. So I don't know how to satisfy your request. Maybe @mattjj might help you. I would also like to know his opinion on the solution I provided.
Oh, okay. If you have a working solution to fix the logsumexp issue, you can do the following:
Note, this is a typical workflow for adding new capabilities/ fixing bugs etc. to a repo. Please tag me with any questions if you want help working through the steps
In scipy==0.19.0, the
misc
module was removed soscipy.misc.logsumexp
becomesscipy.special.logsumexp
. Six imports need fixed to resolve that.One option is
Otherwise, pin scipy>=0.19.0.