在Pylearn2的快速启动示例中运行python make_dataset时,我在Theano .so
文件中遇到导入错误。问题的核心似乎是:undefined symbol: _gfortran_st_write
。我正在运行numpy,scipy,Theano和Pylearn2的开发版本。有什么想法吗?
Traceback (most recent call last):
File "make_dataset.py", line 58, in <module>
train.apply_preprocessor(preprocessor=pipeline, can_fit=True)
File "/home/mmay/Downloads/Installs/pylearn2/pylearn2/datasets/dense_design_matrix.py", line 710, in apply_preprocessor
preprocessor.apply(self, can_fit)
File "/home/mmay/Downloads/Installs/pylearn2/pylearn2/datasets/preprocessing.py", line 175, in apply
item.apply(dataset, can_fit)
File "/home/mmay/Downloads/Installs/pylearn2/pylearn2/datasets/preprocessing.py", line 1424, in apply
new_x_symbol)
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/compile/function.py", line 223, in function
profile=profile)
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/compile/pfunc.py", line 511, in pfunc
on_unused_input=on_unused_input)
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/compile/function_module.py", line 1332, in orig_function
defaults)
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/compile/function_module.py", line 1198, in create
_fn, _i, _o = self.linker.make_thunk(input_storage=input_storage_lists)
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/gof/link.py", line 489, in make_thunk
output_storage=output_storage)[:3]
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/gof/vm.py", line 881, in make_all
no_recycling))
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/gof/op.py", line 618, in make_thunk
output_storage=node_output_storage)
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/gof/cc.py", line 987, in make_thunk
keep_lock=keep_lock)
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/gof/cc.py", line 930, in __compile__
keep_lock=keep_lock)
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/gof/cc.py", line 1367, in cthunk_factory
key=key, fn=self.compile_cmodule_by_step, keep_lock=keep_lock)
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/gof/cmodule.py", line 1005, in module_from_key
module = next(compile_steps)
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/gof/cc.py", line 1282, in compile_cmodule_by_step
preargs=preargs)
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/gof/cmodule.py", line 1993, in compile_str
return dlimport(lib_filename)
File "/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/theano/gof/cmodule.py", line 290, in dlimport
rval = __import__(module_name, {}, {}, [module_name])
ImportError: ('The following error happened while compiling the node', Dot22(Elemwise{sub,no_inplace}.0, P_), '\n', '/home/mmay/.theano/compiledir_Linux-3.2.0-63-generic-x86_64-with-elementary_OS-0.2-luna-x86_64-2.7.3-64/tmpFGIAyD/0e96d34cc789a5edba0ae9e735b21a70.so:
undefined symbol: _gfortran_st_write', '[Dot22(<TensorType(float32, matrix)>, P_)]')
答案 0 :(得分:0)
在删除ATLAS,安装OpenBLAS,重新安装numpy + scipy + theano,然后从源安装Pylearn2后,问题得以解决。
有关详细说明,请参阅Theano安装指南的https://github.com/Theano/Theano/blob/master/doc/install_ubuntu.txt#L70。