DLL Load failed when importing PyStan on Windows
Asked Answered
F

0

6

I am trying to import PyStan in Windows 10, but I keep getting the following error:

Traceback (most recent call last):
import pystan
File "C:\Users\User\AppData\Local\Continuum\Anaconda2\envs\test\lib\site-packages\pystan\__init__.py", line 9, in <module>
  from pystan.api import stanc, stan
File "C:\Users\User\AppData\Local\Continuum\Anaconda2\envs\test\lib\site-packages\pystan\api.py", line 14, in <module>
  import pystan._api  # stanc wrapper
ImportError: DLL load failed: The specified module could not be found.

I have uninstalled PyStan and reinstalled with Pip, but I seem to be getting the same error. I use the following Python version:

Python 3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 16:05:27) [MSC v.1900 64 bit (AMD64)] on win32

I also get the same error when I am not working in a virtual environment.

Thanks in advance.

Forbear answered 15/11, 2018 at 13:38 Comment(5)
According to their documentation pyStan is partially supported on Windows. However, do you have multiple instances of Anaconda installed on your system? couldn't help but notice the folder name Anaconda2Dorella
@Dorella I only have one Anaconda version installed, which is 2, hence the folder name.Forbear
i tried installing it in a virtual environment on Python 3.7 64-bit and got the same error, the package seems to be broken.Dorella
It seems like indeed, this is a Windows problem, because I just installed it on Ubuntu 16 without any problems.Forbear
This answer might help you. https://mcmap.net/q/1094506/-import-pystan-_api-failed-importerror-dll-load-failed-the-specified-module-could-not-be-foundExpendable

© 2022 - 2024 — McMap. All rights reserved.