streamlit - 我正在尝试使用来自 fbprophet 的 Prophet,但我收到了这个非常长的错误消息,不知道是什么意思?
问题描述
错误:命令出错,退出状态为 1:命令:/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/setup.py'"'"'; file ='"'"'/private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/setup.py'"'"';f=getattr(tokenize, '"''" "'"', open)( file );code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"'); f.close();, '"'"'exec'"'"'))' install --record /private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-record-2j0pe0nh/install-record.txt --single-version-externally -托管 --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/fbprophet cwd: /private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76 /fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/ 完整输出(40 行):运行 install running build running build_py 创建 build 创建 build/lib 创建 build/lib/fbprophet 创建 build/lib/fbprophet/stan_model 回溯(最近一次调用最后):文件“”,第 1 行,在文件“/private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/setup.py”中,第 122 行,在设置(文件“/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/setuptools/在里面设置工具,标记化;sys.argv[0] = '"'"'/private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/setup.py'"'"';file ='"'"'/private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-install-91n1df76/fbprophet_e94a6b9aeb83455cb3e0fdf4115391fb/setup.py'"'"';f=getattr(tokenize, '"''" "'"', open)( file );code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"'); f.close();exec(compile(code, file , '"'"'exec'"'"'))' install --record /private/var/folders/r4/nqsj60p57yq9vh_zy4fq6n000000gn/T/pip-record-2j0pe0nh /install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/fbprophet 检查日志以获取完整的命令输出。
解决方案
/fbprophet/models.py",第 209 行,在 build_model 导入 pystan ModuleNotFoundError: No module named 'pystan' ---------------------------- ------------- 错误:命令出错,退出状态为 1
这是您的错误信息。你安装了 pystan 吗?
如果您有并且仍然收到此错误,请尝试卸载 pystan 并安装旧版本。
我遇到了同样的问题,以下对我有用:
第 1 步:卸载 pystan
pip uninstall pystan
第 2 步:安装 pystan 版本 ~2.14
pip install pystan~=2.14
**第 3 步:再次尝试安装 fbprophet **
pip install fbprophet
参考。
推荐阅读
- python - 使用 CoreML 转换器遇到 sklearn 版本问题
- mobx - 是否可以观察特定地图条目的 mobx-state-tree 事件
- .net - .NET 可执行文件中存储的 .NET IL 字节在哪里,可执行文件如何在运行时将它们转换为 x86?
- r - R:列上的子集数据框 as.factor() 产生空子集
- python - Python 中的问题(尝试、最终和除外)
- python - 如何将张量转换为 numpy 数组?
- r - 如何在 R 中使用循环仅对负数进行平均,直到在向量中看到绝对值> 1 的数字?
- python - 如何在同一文件夹中重新加载() .py 文件?
- flutter - Flutter 视频播放器不接受自签名 https 连接
- c++ - How to use a QVector?