Search code examples
pythondockerjenkinspippystan

Why is pystan installation so slow?


I have a python project which relies on pystan (for fbprophet). As part of a CI/CD workflow I am trying to set up jenkins to build the images and push to a docker registry. However, the pip installation of pystan is super slow. Seems to be stuck at this stage for 10+ minutes:

Building wheels for collected packages: pystan, pymeeus
  Building wheel for pystan (setup.py): started
  Building wheel for pystan (setup.py): still running ...

Jenkins appears to become unresponsive on a t2.medium anytime I try to build the image.

Is there another way to install pystan? Download the wheels beforehand? How can I figure out what is making it so slow?

I could potentially start form a base docker image which already has pystan installed perhaps?


Solution

  • PyStan currently provides a number of precompiled wheels for different platforms and Python versions except for Python 3.8.

    Can I guess you use Python 3.8? Try downgrading to 3.7 — pip should install PyStan without compilation.