简体   繁体   中英

Error: Failed to building wheel for fbprophet

I saw a similar post in StackOverflow.But my question is different as I'm using Jupyterlab, not the anaconda I'm trying to install fbprophet in my jupyterlab 3.0.16. So I wrote the following command

pip install fbprophet  --index-url https://PID9320:AKCp8ihpJPJd3ypP1iFzctiec1VQpAoP2wENLEeHvk3RwaZUTWoLC7TrsZcSr1RXDjgRnAPtN@artifacts.myorganization.com/artifactory/api/pypi/pypi-opensource-virtual/simple/

But I'm getting the following error

ERROR: Command errored out with exit status 1:
command: /opt/conda/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] 
 '"'"'/tmp/pip-install-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/setup.py'"'"'; 
 __file__='"'"'/tmp/pip-install- 
cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/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'"'"'))' bdist_wheel -d 
/tmp/pip-wheel-zatwojac
cwd: /tmp/pip-install-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/
Complete output (38 lines):
running bdist_wheel
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-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/setup.py", line 
122, in <module>
setup(
File "/opt/conda/lib/python3.9/site-packages/setuptools/__init__.py", line 163, in setup
return distutils.core.setup(**attrs)
File "/opt/conda/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/conda/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/opt/conda/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/opt/conda/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/conda/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/opt/conda/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/conda/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/setup.py", line 48, in run
build_models(target_dir)
File "/tmp/pip-install-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/setup.py", line 38, in build_models
StanBackendEnum.get_backend_class(backend).build_model(target_dir, MODEL_DIR)
File "/tmp/pip-install- cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/fbprophet/models.py", line 209, in build_model
import pystan
ModuleNotFoundError: No module named 'pystan'
----------------------------------------
ERROR: Failed building wheel for fbprophet
Running setup.py clean for fbprophet
Failed to build fbprophet
Installing collected packages: fbprophet
Running setup.py install for fbprophet ... error
ERROR: Command errored out with exit status 1:
command: /opt/conda/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = 
'"'"'/tmp/pip-install-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/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-r8flusah/install-record.txt --single-version-externally-managed --compile --install-headers /opt/conda/include/python3.9/fbprophet
cwd: /tmp/pip-install-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/
Complete output (40 lines):
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-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/setup.py", line 122, in <module>
setup(
File "/opt/conda/lib/python3.9/site-packages/setuptools/__init__.py", line 163, in setup
return distutils.core.setup(**attrs)
File "/opt/conda/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/conda/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/opt/conda/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/opt/conda/lib/python3.9/distutils/command/install.py", line 546, in run
self.run_command('build')
File "/opt/conda/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/conda/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/opt/conda/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/opt/conda/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/conda/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/tmp/pip-install-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/setup.py", line 48, in run
build_models(target_dir)
File "/tmp/pip-install-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/setup.py", line 38, in build_models
StanBackendEnum.get_backend_class(backend).build_model(target_dir, MODEL_DIR)
File "/tmp/pip-install-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/fbprophet/models.py", line 209, in build_model
import pystan
ModuleNotFoundError: No module named 'pystan'
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/conda/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cgp5pdch/fbprophet_8764c51e1f124e7cb133a0f03a15e397/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-r8flusah/install-record.txt --single-version-externally-managed --compile --install-headers /opt/conda/include/python3.9/fbprophet Check the logs for full command output.

I have installed pystan in my system but still, I have this issue Can you help me to resolve the issue?

fbprophet rely on pystan as it developed in its backend.

Before doing anything with fbprophet , try reinstalling pystan and make sure you are in the same working directory as fbprophet :

check your system environment path to check you are installing fbprophet in same directory you are working with python environment

$ pip install pystan 

I was able to install using the following:

$ pip install localpip 
$ localpip install fbprophet

and it worked for me... You can try this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM