python - Jupyter Notebook 中 fbprophet 的构建轮子失败
问题描述
我正在尝试使用在 Jupyter Notebook 中安装 fbprophet !pip install fbprophet
。
我已经有 pystan 和 Microsoft Visual Studio
以下是我得到的错误
fbprophet 命令的构建轮失败“C:\Users\evaldovi\Anaconda3\python.exe -u -c”import setuptools, tokenize; file ='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 --single-version-externally-managed --compile" 在 C:\Users\evaldovi\AppData\Local\Temp\pip- 中出现错误代码 1 失败安装-e2tuxpri\fbprophet\
解决方案
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
推荐阅读
- ms-word - Office Word javascript API中的onScroll事件
- php - PHP关于进入MYSQL dbase的小写和大写条目
- azure - azure sql 的 azure 用户分配标识失败
- fix-protocol - 一个 FIX 消息被分成 02 个部分。如何链接这些损坏的 FIX 消息集以使其成为完整的 FIX 消息?
- javascript - 输入字符串是否有 . 或者 ?或'或空间?
- google-sheets-formula - 如何使用 Google 表格中的 SPLIT/LEFT/RIGHT 功能将数字与文本分开
- powershell - PowerShell 中的 Autorunsc64 (sysinternals) 命令行问题
- javascript - 过滤javascript后总和html表列
- reactjs - 在 URL 中使用 % 进行反应解码会导致错误
- google-pay - 如何接收 Google Pay 的加密支付令牌数据