DLL load error on windows 10

D:\ProgramData\Miniconda3\python.exe “F:/PyCharm 2018.3/Global_Observer.py”
Traceback (most recent call last):
File “F:/PyCharm 2018.3/Global_Observer.py”, line 31, in
start = pm.find_MAP()
File “D:\ProgramData\Miniconda3\lib\site-packages\pymc3\tuning\starting.py”, line 77, in find_MAP
dlogp_func = bij.mapf(model.fastdlogp_nojac(vars))
File “D:\ProgramData\Miniconda3\lib\site-packages\pymc3\model.py”, line 249, in fastdlogp_nojac
return self.model.fastfn(gradient(self.logp_nojact, vars))
File “D:\ProgramData\Miniconda3\lib\site-packages\pymc3\model.py”, line 939, in fastfn
f = self.makefn(outs, mode, *args, **kwargs)
File “D:\ProgramData\Miniconda3\lib\site-packages\pymc3\model.py”, line 909, in makefn
mode=mode, *args, **kwargs)
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\compile\function.py”, line 317, in function
output_keys=output_keys)
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\compile\pfunc.py”, line 486, in pfunc
output_keys=output_keys)
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\compile\function_module.py”, line 1841, in orig_function
fn = m.create(defaults)
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\compile\function_module.py”, line 1715, in create
input_storage=input_storage_lists, storage_map=storage_map)
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\gof\link.py”, line 699, in make_thunk
storage_map=storage_map)[:3]
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\gof\vm.py”, line 1091, in make_all
impl=impl))
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\gof\op.py”, line 955, in make_thunk
no_recycling)
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\gof\op.py”, line 858, in make_c_thunk
output_storage=node_output_storage)
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\gof\cc.py”, line 1217, in make_thunk
keep_lock=keep_lock)
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\gof\cc.py”, line 1157, in compile
keep_lock=keep_lock)
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\gof\cc.py”, line 1620, in cthunk_factory
key=key, lnk=self, keep_lock=keep_lock)
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\gof\cmodule.py”, line 1181, in module_from_key
module = lnk.compile_cmodule(location)
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\gof\cc.py”, line 1523, in compile_cmodule
preargs=preargs)
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\gof\cmodule.py”, line 2397, in compile_str
return dlimport(lib_filename)
File “D:\ProgramData\Miniconda3\lib\site-packages\theano\gof\cmodule.py”, line 309, in dlimport
rval = import(module_name, {}, {}, [module_name])
ImportError: DLL load failed: 找不到指定的模块(can’t find model)。

I using conda(miniconda)… I was crazy fast!!
Help me! ┭┮﹏┭┮

System:win10

All your errors are related to environment set up. I think it might be useful to reset your environment completely, and make sure theano can be imported and run (e.g., follow http://deeplearning.net/software/theano/install_windows.html#requirements-installation-through-conda-recommended).

1 Like

Python == 2.7* or ( >= 3.4 and < 3.6 )

@junpenglao
I use Python 3.7…Am I gone???
Yet another, using miniconda’s instructions “conda install pymc3” cause error , like some “matplotlib”/“numpy”/“scipy” about Pymc3 will be WARNING

I use Pycharm install the Pymc3

@junpenglao

When I uninstall “mingw-w64-install”/“tdm64-gcc-5.1.0-2”, the code is working
Just WARNING “no g++”/“no c++”…
What is your idea??

Help meφ(>ω<*) Our Dear junpeng…

This is a pretty weird error - again, keep the “mingw-w64-install”/“tdm64-gcc-5.1.0-2” installed, and try from a jupyter notebook first.

1 Like

@junpenglao
Python == 2.7* or ( >= 3.4 and < 3.6 )

Python 3.7 can’t use theano???

@junpenglao Help,HElp,HELp,HELP. Dear junpeng

I reinstall miniconda and just “conda install pymc3”
Well… The warning is shown below:

Try: pm.sample(100, cores=1)

@junpenglao
Dear junpeng…(>ω<*) The warning changed:
PS: Red arrow is “no g++”/“no c++”, using Python output
I found code can wrok when “no g++”/“no c++”, If “conda install pymc3”,code can’t work

I dont think there are any more g++ error.
So to recap:
The error you are seeing before is related to multi-processing in Windows, which we are currently tracking it here: https://github.com/pymc-devs/pymc3/issues/3140
The error you are seeing now is model related, the solution is a bit more complicated so you should start with simpler model and work your way up.

@junpenglao
Dear junpeng
让我用下中文。。。因为我实在不会翻译了。。
如果我不用theano相关的g++ c++,以及使用miniconda的"conda install pymc3" 来自动找到相关的库并安装,那么就会有g++,c++的警告,但是呢,能运行出结果
只要不论是自行安装tdm64-gcc、mingw-w64,还是使用miniconda的“conda install pymc3”。就一定会报错
就好像只要使用theano的c++实现就要出错似的

但是你的意思似乎是说,现在的错误已经无关theno的g++ c++实现,而是win10有关的多核运行问题?我的理解对吗?
PS:我是在跟着你翻译的那本书里的代码呀~~

Yes - That’s why your code can run after setting cores=1.

You should have a look at the repo for the updated code - there are many changes since then the model might need improvement after its first published.

1 Like