Search code examples
pythonpython-3.xamazon-emrpystan

ModuleNotFoundError: No module named 'pystan'


Pystan has been installed successfully on EMR nodes (master, task and core nodes), but I still get this error

ModuleNotFoundError: No module named pystan

I installed pystan using pip install pystan through boostrap_scrtip_actions.

Does anyone know what could be the issue?

I use Python 3.7, emr 6.3.0.


Solution

  • Found the issue, posting the answer here for others. When installing the pystan without specifying the version, it installs the latest version and in the latest version of pystan, it uses stan as the main module and not pystan. To resolve the issue, specify your version or use import stan instead.

    Refer to the latest pystan doc https://pypi.org/project/pystan/