【问题标题】:Pylearn2 Tutorial Import ErrorPylearn2教程导入错误
【发布时间】:2014-07-03 04:55:42
【问题描述】:

在 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_)]')

【问题讨论】:

  • 你安装了 libgfortran3 吗?似乎它正在尝试与您的系统或安装中不存在的某种其他库链接。 (我发现您不太可能为此安装 gfortran,但值得一试。)
  • 实际上,这看起来是一个很好的类似问题:stackoverflow.com/questions/11987325/…
  • 谢谢,我去看看!另外,你好,德里克。
  • Aaaa 以及 Theano 安装指南中的相关建议(搜索 gfortran):github.com/Theano/Theano/blob/master/doc/install_ubuntu.txt
  • 哦,废话,我什至没有看谁在问。这很奇怪。小世界。

标签: python numpy scipy theano


【解决方案1】:

在删除 ATLAS、安装 OpenBLAS、重新安装 numpy + scipy + theano,然后从源代码安装 Pylearn2 后问题得到解决。

有关更详细的说明,请参阅 Theano 安装指南的 https://github.com/Theano/Theano/blob/master/doc/install_ubuntu.txt#L70

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多