在尝试安装fbprophet时,安装过程会卡在这个部分:
正在为已收集的软件包构建 wheels: prophet 为 prophet (setup.py) 构建 wheel ... | 已安装 pystan 和 ephem。 操作系统 - Ubuntu 20.04
在尝试安装fbprophet时,安装过程会卡在这个部分:
正在为已收集的软件包构建 wheels: prophet 为 prophet (setup.py) 构建 wheel ... | 已安装 pystan 和 ephem。 操作系统 - Ubuntu 20.04
在安装fbprophet
之前,您需要先安装pystan
。
Prophet的默认依赖项是pystan。PyStan有自己的安装说明。在使用pip安装prophet之前,请使用pip安装pystan。
python3 -m pip install pystan==2.19.1.1
sudo apt install python3-dev
python3 -m pip install prophet
https://github.com/facebook/prophet/blob/b75844e07c3b09bf3bc383c9d43241c554dd251b/Dockerfile
FROM python:3.7-stretch
RUN apt-get -y install libc-dev
RUN pip install pip==19.1.1
COPY python/requirements.txt .
RUN pip install -r requirements.txt
...
我安装了Python的依赖项
sudo apt-get update; sudo apt-get install make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
我使用pyenv安装了Python 3.7.10。
我安装了requirements。
Cython>=0.22
cmdstanpy==0.9.68
pystan~=2.19.1.1
numpy>=1.15.4
pandas>=1.0.4
matplotlib>=2.0.0
LunarCalendar>=0.0.9
convertdate>=2.1.2
holidays>=0.10.2
setuptools-git>=1.2
python-dateutil>=2.8.0
tqdm>=4.36.1
而且我安装了Prophet
pip install prophet
从此 docker-compose.yaml 构建 Docker 镜像。
docker-compose build package
有了那个,你可以使用构建的图像。
sudo apt update
sudo apt install python3-dev python3-pip python3-venv
python3 -m pip install pystan
python3 -m pip install prophet
我使用了conda,对我很有效
conda install gcc_linux-64 gxx_linux-64 -c anaconda
conda install pystan -c conda-forge
conda install --yes \
-c conda-forge fbprophet