首页 > 解决方案 > 我正在尝试使用来自 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 检查日志以获取完整的命令输出。

标签: streamlit

解决方案


/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

参考


推荐阅读