在 colab 上安装 fbprophet

Goz*_*zdi 3 python google-colaboratory facebook-prophet

您好,当我尝试在 google colab 上安装 fbprophet 时,出现此错误,有人知道如何解决吗?

Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Collecting fbprophet
  Using cached fbprophet-0.7.1.tar.gz (64 kB)
Requirement already satisfied: Cython>=0.22 in /usr/local/lib/python3.7/dist-packages (from fbprophet) (0.29.30)
Requirement already satisfied: cmdstanpy==0.9.5 in /usr/local/lib/python3.7/dist-packages (from fbprophet) (0.9.5)
Requirement already satisfied: pystan>=2.14 in /usr/local/lib/python3.7/dist-packages (from fbprophet) (3.3.0)
Requirement already satisfied: numpy>=1.15.4 in /usr/local/lib/python3.7/dist-packages (from fbprophet) (1.21.6)
Requirement already satisfied: pandas>=1.0.4 in /usr/local/lib/python3.7/dist-packages (from fbprophet) (1.3.5)
Requirement already satisfied: matplotlib>=2.0.0 in /usr/local/lib/python3.7/dist-packages (from fbprophet) (3.2.2)
Requirement already satisfied: LunarCalendar>=0.0.9 in /usr/local/lib/python3.7/dist-packages (from fbprophet) (0.0.9)
Requirement already satisfied: convertdate>=2.1.2 in /usr/local/lib/python3.7/dist-packages (from fbprophet) (2.4.0)
Requirement already satisfied: holidays>=0.10.2 in /usr/local/lib/python3.7/dist-packages (from fbprophet) (0.14.2)
Requirement already satisfied: setuptools-git>=1.2 in /usr/local/lib/python3.7/dist-packages (from fbprophet) (1.2)
Requirement already satisfied: python-dateutil>=2.8.0 in /usr/local/lib/python3.7/dist-packages (from fbprophet) (2.8.2)
Requirement already satisfied: tqdm>=4.36.1 in /usr/local/lib/python3.7/dist-packages (from fbprophet) (4.64.0)
Requirement already satisfied: pymeeus<=1,>=0.3.13 in /usr/local/lib/python3.7/dist-packages (from convertdate>=2.1.2->fbprophet) (0.5.11)
Requirement already satisfied: hijri-converter in /usr/local/lib/python3.7/dist-packages (from holidays>=0.10.2->fbprophet) (2.2.4)
Requirement already satisfied: korean-lunar-calendar in /usr/local/lib/python3.7/dist-packages (from holidays>=0.10.2->fbprophet) (0.2.1)
Requirement already satisfied: pytz in /usr/local/lib/python3.7/dist-packages (from LunarCalendar>=0.0.9->fbprophet) (2022.1)
Requirement already satisfied: ephem>=3.7.5.3 in /usr/local/lib/python3.7/dist-packages (from LunarCalendar>=0.0.9->fbprophet) (4.1.3)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib>=2.0.0->fbprophet) (3.0.9)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.7/dist-packages (from matplotlib>=2.0.0->fbprophet) (1.4.4)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.7/dist-packages (from matplotlib>=2.0.0->fbprophet) (0.11.0)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from kiwisolver>=1.0.1->matplotlib>=2.0.0->fbprophet) (4.1.1)
Requirement already satisfied: clikit<0.7,>=0.6 in /usr/local/lib/python3.7/dist-packages (from pystan>=2.14->fbprophet) (0.6.2)
Requirement already satisfied: pysimdjson<4.0,>=3.2 in /usr/local/lib/python3.7/dist-packages (from pystan>=2.14->fbprophet) (3.2.0)
Requirement already satisfied: aiohttp<4.0,>=3.6 in /usr/local/lib/python3.7/dist-packages (from pystan>=2.14->fbprophet) (3.8.1)
Requirement already satisfied: httpstan<4.7,>=4.6 in /usr/local/lib/python3.7/dist-packages (from pystan>=2.14->fbprophet) (4.6.1)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp<4.0,>=3.6->pystan>=2.14->fbprophet) (2.1.0)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.7/dist-packages (from aiohttp<4.0,>=3.6->pystan>=2.14->fbprophet) (4.0.2)
Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp<4.0,>=3.6->pystan>=2.14->fbprophet) (1.7.2)
Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.7/dist-packages (from aiohttp<4.0,>=3.6->pystan>=2.14->fbprophet) (1.2.0)
Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.7/dist-packages (from aiohttp<4.0,>=3.6->pystan>=2.14->fbprophet) (1.3.0)
Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.7/dist-packages (from aiohttp<4.0,>=3.6->pystan>=2.14->fbprophet) (6.0.2)
Requirement already satisfied: asynctest==0.13.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp<4.0,>=3.6->pystan>=2.14->fbprophet) (0.13.0)
Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.7/dist-packages (from aiohttp<4.0,>=3.6->pystan>=2.14->fbprophet) (21.4.0)
Requirement already satisfied: pylev<2.0,>=1.3 in /usr/local/lib/python3.7/dist-packages (from clikit<0.7,>=0.6->pystan>=2.14->fbprophet) (1.4.0)
Requirement already satisfied: crashtest<0.4.0,>=0.3.0 in /usr/local/lib/python3.7/dist-packages (from clikit<0.7,>=0.6->pystan>=2.14->fbprophet) (0.3.1)
Requirement already satisfied: pastel<0.3.0,>=0.2.0 in /usr/local/lib/python3.7/dist-packages (from clikit<0.7,>=0.6->pystan>=2.14->fbprophet) (0.2.1)
Requirement already satisfied: appdirs<2.0,>=1.4 in /usr/local/lib/python3.7/dist-packages (from httpstan<4.7,>=4.6->pystan>=2.14->fbprophet) (1.4.4)
Requirement already satisfied: webargs<9.0,>=8.0 in /usr/local/lib/python3.7/dist-packages (from httpstan<4.7,>=4.6->pystan>=2.14->fbprophet) (8.2.0)
Requirement already satisfied: setuptools>=41.0 in /usr/local/lib/python3.7/dist-packages (from httpstan<4.7,>=4.6->pystan>=2.14->fbprophet) (57.4.0)
Requirement already satisfied: marshmallow<4.0,>=3.10 in /usr/local/lib/python3.7/dist-packages (from httpstan<4.7,>=4.6->pystan>=2.14->fbprophet) (3.17.0)
Requirement already satisfied: packaging>=17.0 in /usr/local/lib/python3.7/dist-packages (from marshmallow<4.0,>=3.10->httpstan<4.7,>=4.6->pystan>=2.14->fbprophet) (21.3)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.7/dist-packages (from python-dateutil>=2.8.0->fbprophet) (1.15.0)
Requirement already satisfied: idna>=2.0 in /usr/local/lib/python3.7/dist-packages (from yarl<2.0,>=1.0->aiohttp<4.0,>=3.6->pystan>=2.14->fbprophet) (2.10)
Building wheels for collected packages: fbprophet
  Building wheel for fbprophet (setup.py) ... error
  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: /usr/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mghunffz/fbprophet_2d75d382214e4622a66d686904a6dfb7/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mghunffz/fbprophet_2d75d382214e4622a66d686904a6dfb7/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-dqpxd5x_/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/fbprophet Check the logs for full command output.
Run Code Online (Sandbox Code Playgroud)

我添加了一些随机文本,所以 stackoverflow 让我发布这个问题,请忽略 Lorem Ipsum 只是印刷和排版行业的虚拟文本。自 1500 年代以来,Lorem Ipsum 一直是行业标准的虚拟文本,当时一位不知名的印刷商拿走了一堆字体并将其打乱以制作一本字体样本簿。它不仅经历了五个世纪的考验,而且跨越了电子排版的时代,基本保持不变。它在 20 世纪 60 年代随着包含 Lorem Ipsum 段落的 Letraset 表的发布而流行起来,最近又随着包含 Lorem Ipsum 版本的 Aldus PageMaker 等桌面出版软件而流行。

Mok*_*ffy 15

你可以尝试这个,目前我正在 colab 中开发 fb-prophet,我使用了这个软件包,它运行顺利 - 这是旧版本

!pip install pystan~=2.14
!pip install fbprophet
Run Code Online (Sandbox Code Playgroud)

对于最新版本,只需安装 Prophet,无需安装 pystan -

!pip install prophet

import prophet
Run Code Online (Sandbox Code Playgroud)