我正在尝试使用!pip install fbprophet
在Jupyter Notebook中安装fbprophet。
我已经有pystan和Microsoft Visual Studio
以下是我得到的错误
fbprophet的失败建筑车轮 命令“ C:\ Users \ evaldovi \ Anaconda3 \ python.exe -u -c”导入设置工具,标记化; 文件 ='C:\ Users \ evaldovi \ AppData \ Local \ Temp \ pip-install -e2tuxpri \ 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 C:\ Users \ evaldovi \ AppData \ Local \ Temp \ pip-record-yijav0j4 \ install-record.txt-“单一版本-外部管理-编译”失败,错误代码为1:C:\ Users \ evaldovi \ AppData \ Local \ Temp \ pip-install-e2tuxpri \ fbprophet \
答案 0 :(得分:0)
Usually the source of this issue is that PyStan is not working due to the C++ compiler not working properly.
You can check if PyStan is working with
import pystan
model_code = 'parameters {real y;} model {y ~ normal(0,1);}'
model = pystan.StanModel(model_code=model_code) # this will take a minute
y = model.sampling(n_jobs=1).extract()['y']
y.mean() # should be close to 0
Anaconda的安装稍微复杂一点,因为它具有与系统python分离的构建环境。在Anaconda中安装fbprophet的最简单方法是通过conda forge:
conda install gcc
conda install -c conda-forge fbprophet