我正在尝试使用!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)(文件); 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 --single-version-externally- -compile“在C:\ Users \ evaldovi \ AppData \ Local \ Temp \ pip-install-e2tuxpri \ fbprophet \中失败,错误代码为1
最佳答案
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