Van*_*era 7 python importerror pystan
我已经安装了 python 3.7 并想使用 fbprophet ( https://facebook.github.io/prophet/docs/installation.html#python )做一些预测
但是在使用命令(pip install fbprophet)安装软件包时出现此错误
import pystan
File "e:\repos\usf\venv\lib\site-packages\pystan\__init__.py", line 9, in <module>
from pystan.api import stanc, stan
File "e:\repos\usf\venv\lib\site-packages\pystan\api.py", line 13, in <module>
import pystan._api # stanc wrapper
ImportError: DLL load failed: The specified module could not be found.
Run Code Online (Sandbox Code Playgroud)
我做了一些研究,并知道使用 conda 是可能的。但我正在寻找不使用 conda 的解决方案。
提前致谢。
Pystan 文档中指出,在 Windows 上配置 C++ 编译器可能具有挑战性。以下方法适用于我安装 Pystan 2.17.1 和 FBProphet 0.6:
安装 C++ 编译器 mingw-w64 ( http://mingw-w64.org/doku.php/download ) -> 我选择了这个https://sourceforge.net/projects/mingw-w64/files/
将 C:<MinGW_w64 安装目录>\bin 添加到 PATH 环境变量中
在 Python 安装目录(在 venv 中)的 \Lib\distutils 文件夹中创建包含以下内容的 distutils.cfg 文件:
[构建] 编译器=mingw32
[build_ext] 编译器=mingw32
pip 安装 numpy cython
pip 安装 pystan==2.17.1
验证 Pystan 安装 ( https://pystan.readthedocs.io/en/latest/windows.html )
pip 安装 fbprophet==0.6