mattjj / pyhsmm

MIT License
550 stars 175 forks source link

Installing on linux (HPCC) #114

Open jonahpearl opened 2 years ago

jonahpearl commented 2 years ago

I had some mild trouble installing pyhsmm on a linux-based computing cluster...documenting various errors and fixes in one place for anyone else who encounters them. Most have been solved in the issues before, but there are a few key points.

  1. You need to have the packages cython, requests, and futures installed before you run pyhsmm installation. (This is because the setup.py script imports them -- the script isn't smart enough to look in its own list of requirements before importing the modules it uses :).)
  2. Don't use python setup.py install, use pip install . This is critical. (See discussions e.g. here).
  3. You have to patch pybasicbayes manually (at least until the latest fix gets pushed to pypi)

Full list of commands I ran: conda create -n pyhsmm_test_2 python=3.7 conda activate pyhsmm_test_2 pip install cython pip install requests pip install future cd [where you want the pyhsmm repo to live] git clone https://github.com/mattjj/pyhsmm.git cd pyhsmm pip install . pip install --upgrade git+https://github.com/mattjj/pybasicbayes.git

And then double-check with: python /path/to/pyhsmm/examples/hmm.py