Unable to install pystan & fbprophet

Solved!
vaishnavi
Level 3
Unable to install pystan & fbprophet

I tried installing "pystan" and fbprophet by mentioning them in the "Code envs" section. When I click on "Save and Update" I am getting the below error:

 

Building wheel for fbprophet (setup.py): finished with status 'error'  Running setup.py clean for fbprophetFailed to build fbprophetInstalling collected packages: fbprophet    Running setup.py install for fbprophet: started    File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command      cmd_obj.run()    File "/usr/local/lib/python3.9/distutils/command/build.py", line 135, in run      self.run_command(cmd_name)    File "/usr/local/lib/python3.9/distutils/cmd.py", line 313, in run_command      self.distribution.run_command(command)    File "/usr/local/lib/python3.9/distutils/dist.py", line 985, in run_command      cmd_obj.run()    File "/tmp/pip-install-glmpivky/fbprophet_f56776630f7840e29283e54e3f540846/setup.py", line 48, in run      build_models(target_dir)    File "/tmp/pip-install-glmpivky/fbprophet_f56776630f7840e29283e54e3f540846/setup.py", line 38, in build_models      StanBackendEnum.get_backend_class(backend).build_model(target_dir, MODEL_DIR)    File "/tmp/pip-install-glmpivky/fbprophet_f56776630f7840e29283e54e3f540846/fbprophet/models.py", line 209, in build_model      import pystan  ModuleNotFoundError: No module named 'pystan'  ----------------------------------------  ERROR: Failed building wheel for fbprophet    ERROR: Command errored out with exit status 1:     command: /usr/src/app/dataiku-install/code-envs/python/PYTHON_3_9_V/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-glmpivky/fbprophet_f56776630f7840e29283e54e3f540846/setup.py'"'"'; __file__='"'"'/tmp/pip-install-glmpivky/fbprophet_f56776630f7840e29283e54e3f540846/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-ve7ep1f9/install-record.txt --single-version-externally-managed --compile --install-headers /usr/src/app/dataiku-install/code-envs/python/PYTHON_3_9_V/include/site/python3.9/fbprophet 

 

0 Kudos
1 Solution
JordanB
Dataiker

Hi @vaishnavi,

fbprophet relies on pystan, so please try installing pystan first and switch fbprophet to prophet (newer version).

Please try adding the following to your list of installed packages:
pystan<3
prophet

If you receive errors, you can either attach the logs here. Alternatively, you may send an email to support, or live chat us and attach a code env diagnostic.

Screen Shot 2022-09-22 at 1.12.34 PM.png
 
Thanks,
Jordan

View solution in original post

4 Replies
JordanB
Dataiker

Hi @vaishnavi,

fbprophet relies on pystan, so please try installing pystan first and switch fbprophet to prophet (newer version).

Please try adding the following to your list of installed packages:
pystan<3
prophet

If you receive errors, you can either attach the logs here. Alternatively, you may send an email to support, or live chat us and attach a code env diagnostic.

Screen Shot 2022-09-22 at 1.12.34 PM.png
 
Thanks,
Jordan
vaishnavi
Level 3
Author

@JordanB Thanks, I made the changes you had mentioned above and the installation worked. For further support how to start the live chat ?

I want to use the Prophet model for timeseries forecasting in Dataiku. As we do not have Prophet model in the dataiku's list of models, If I use it in the python code recipe and create a model, how to access that model in other projects ?

JordanB
Dataiker

Hi @vaishnavi,

The ML API allows you to manipulate ML Tasks, and use them to train models, inspect their details, and deploy them to the Flow.

Once deployed to the Flow, the Saved model  can be shared between projects.

You may share project objects such as models with other projects by going to your saved model. 

Screen Shot 2022-09-26 at 9.25.02 AM.png

Selecting the model you want to share from the list, and choose "Share" in the actions menu:

Screen Shot 2022-09-26 at 9.24.46 AM.png

Please see our documentation on Shared Objects for more details: https://doc.dataiku.com/dss/latest/security/shared-objects.html?highlight=shared

You can also save your model to a file using the pickle module and load that file into any of your projects. 

If you have any questions, please let us know.

Thanks!

Jordan

โ€ƒ

0 Kudos
importthepandas

to note: if you are working with containerized execution, dataiku expects centOS7 based containers. centOS 7 doesnt support C++14, so youll need to pin pystan at pystan==2.18.0.0

0 Kudos