简体   繁体   English

import pystan._api failed:ImportError: DLL load failed: 找不到指定的模块

[英]import pystan._api failed:ImportError: DLL load failed: The specified module could not be found

I have installed python 3.7 and want to do some forecasting using fbprophet ( https://facebook.github.io/prophet/docs/installation.html#python )我已经安装了 python 3.7 并想使用 fbprophet ( https://facebook.github.io/prophet/docs/installation.html#python ) 做一些预测

But I get this error when installing the package using the command (pip install fbprophet)但是在使用命令 (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.

I have done some research and got to know that this is possible with conda.我做了一些研究,并知道使用 conda 是可能的。 But I am looking for a solution without using conda.但我正在寻找不使用 conda 的解决方案。

Thanks in advance.提前致谢。

It says in the Pystan documentation that configuring a C++ compiler can be challenging on Windows.它在Pystan 文档中说,在Windows上配置 C++ 编译器可能具有挑战性。 Following approach worked for me to install Pystan 2.17.1 and FBProphet 0.6:以下方法适用于我安装 Pystan 2.17.1 和 FBProphet 0.6:

  1. Install C++ compiler, mingw-w64 ( http://mingw-w64.org/doku.php/download ) -> I selected this one https://sourceforge.net/projects/mingw-w64/files/安装 C++ 编译器,mingw-w64 ( http://mingw-w64.org/doku.php/download ) -> 我选择了这个https://sourceforge.net/projects/mingw-w64/files/

  2. Add C:<MinGW_w64 installation directory>\\bin to the PATH environment variable将 C:<MinGW_w64 安装目录>\\bin 添加到 PATH 环境变量中

  3. Create a distutils.cfg file with the following contents in the folder \\Lib\\distutils in Python install directory (in venv):在 Python 安装目录(在 venv 中)的 \\Lib\\distutils 文件夹中创建一个包含以下内容的 distutils.cfg 文件:

    [build] compiler=mingw32 [构建] 编译器=mingw32

    [build_ext] compiler=mingw32 [build_ext] 编译器=mingw32

  4. pip install numpy cython pip 安装 numpy cython

  5. pip install pystan==2.17.1 pip 安装 pystan==2.17.1

  6. Verify the Pystan installation ( https://pystan.readthedocs.io/en/latest/windows.html )验证 Pystan 安装 ( https://pystan.readthedocs.io/en/latest/windows.html )

  7. pip install fbprophet==0.6 pip 安装 fbprophet==0.6

Follow https://github.com/facebook/prophet/issues/1939 I had similar issues even after installing Mingw按照https://github.com/facebook/prophet/issues/1939即使在安装 Mingw 之后我也遇到了类似的问题

conda install libpython m2w64-toolchain -c msys2 Solved all the errors and i am able to install fbprophet finally Thanks conda install libpython m2w64-toolchain -c msys2解决了所有错误,我终于可以安装 fbprophet 谢谢

I had similar issues with my Python3.6 (anaconda)我的 Python3.6 (anaconda) 也有类似的问题

I reinstalled anaconda for all users (with admin privileges) then "conda install -c conda-forge pystan" later i updated all other modules我为所有用户重新安装了 anaconda(具有管理员权限),然后“conda install -c conda-forge pystan”之后我更新了所有其他模块

it works without any error now它现在没有任何错误

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 import pycurl ImportError:DLL加载失败:找不到指定的过程 - import pycurl ImportError: DLL load failed: The specified procedure could not be found 导入错误:DLL 加载失败:找不到指定的模块。(Keras) - ImportError: DLL load failed: The specified module could not be found.(Keras) skimage-ImportError:DLL加载失败:找不到指定的模块 - skimage - ImportError: DLL load failed: The specified module could not be found ktrain 导入错误:DLL 加载失败:找不到指定的模块 - ktrain ImportError: DLL load failed: The specified module could not be found pyodbc 导入错误:DLL 加载失败:找不到指定的模块 - pyodbc ImportError: DLL load failed: The specified module could > not be found 导入错误:DLL 加载失败:找不到指定的模块(sklearn) - ImportError: DLL load failed: The specified module could not be found (sklearn) Python ImportError:DLL加载失败:找不到指定的模块 - Python ImportError: DLL load failed: The specified module could not be found Gensim:ImportError:DLL加载失败:找不到指定的模块 - Gensim : ImportError: DLL load failed: The specified module could not be found Seaborn 导入错误:DLL 加载失败:找不到指定的模块 - Seaborn ImportError: DLL load failed: The specified module could not be found 如何修复 ImportError:DLL 加载失败:找不到指定的模块 - how to fix ImportError: DLL load failed: The specified module could not be found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM