azure-functions-core-tools: Unable to publish Facebook Prophet despite publishing all dependencies.
I am using Facebook’s prophet module to do some predicting using a Function app. When I attempt to publish my app, i get the following error:
Installing collected packages: asn1crypto, azure-common, azure-nspkg, azure-cosmosdb-nspkg, idna, certifi, chardet, urllib3, requests, six, python-dateutil, pycparser, cffi, cryptography, azure-storage-common, azure-cosmosdb-table, ephem, pytz, convertdate, cycler, Cython, redis, holidays, setuptools, kiwisolver, lunardate, pyparsing, numpy, matplotlib, pandas, pip, azure-storage-queue, pystan, setuptools-git, fbprophet
Running setup.py install for fbprophet ... error
Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-hjtmj53k/fbprophet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-kq9a4bm4/install-record.txt --single-version-externally-managed --compile --home=/tmp/pip-target-w6b7hjux:
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/fbprophet
creating build/lib/fbprophet/stan_model
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-hjtmj53k/fbprophet/setup.py", line 120, in <module>
"""
File "/usr/local/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/local/lib/python3.6/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-hjtmj53k/fbprophet/setup.py", line 44, in run
build_stan_model(target_dir)
File "/tmp/pip-install-hjtmj53k/fbprophet/setup.py", line 27, in build_stan_model
from pystan import StanModel
ModuleNotFoundError: No module named 'pystan'
when using func pack --build-native-deps. However, commenting out the fbprophet requirement, I am able to publish even though pystan is still on my requirements.txt.
My requirements file: requirements.txt
My thought may be that prophet is searching in wrong directories when the publishing process calls on its setup.py, however, installing using pip works fine on my local machine. Thanks!
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (7 by maintainers)
The issue got solved.
I had the problem because i was using
sudo
to run docker commands. But while setting the environment variable i was usingexport
assudo export
will give error. And hence./func
couldn’t see the variables.Thanks for the help