Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 2教程导入错误_Python_Numpy_Scipy_Theano - Fatal编程技术网

Python 2教程导入错误

Python 2教程导入错误,python,numpy,scipy,theano,Python,Numpy,Scipy,Theano,在Pylern2的快速入门示例中运行PythonMake_dataset时,我在Theano.so文件中遇到了导入错误。问题的核心似乎是:未定义的符号:\u gfortran\u st\u write。我正在运行numpy、scipy、Theano和pylen2的开发版本。有什么想法吗 Traceback (most recent call last): File "make_dataset.py", line 58, in <module> train.apply_pr

在Pylern2的快速入门示例中运行PythonMake_dataset时,我在Theano
.so
文件中遇到了导入错误。问题的核心似乎是:
未定义的符号:\u gfortran\u st\u write
。我正在运行numpy、scipy、Theano和pylen2的开发版本。有什么想法吗

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_)]')
回溯(最近一次呼叫最后一次):
文件“make_dataset.py”,第58行,在
训练应用预处理器(预处理器=管道,can拟合=真)
文件“/home/mmay/Downloads/Installs/pylearn2/pylearn2/datasets/densite_design_matrix.py”,第710行,在应用预处理器中
预处理器。应用(自身,可安装)
文件“/home/mmay/Downloads/Installs/pylearn2/pylearn2/datasets/preprocessing.py”,第175行,在apply中
项。应用(数据集,可容纳)
文件“/home/mmay/Downloads/Installs/pylearn2/pylearn2/datasets/preprocessing.py”,第1424行,在apply中
新_x_符号)
文件“/usr/local/lib/python2.7/dist packages/Theano-0.6.0-py2.7.egg/Theano/compile/function.py”,第223行,在函数中
外形=外形)
pfunc中的文件“/usr/local/lib/python2.7/dist packages/Theano-0.6.0-py2.7.egg/Theano/compile/pfunc.py”,第511行
on_unused_input=on_unused_input)
文件“/usr/local/lib/python2.7/dist packages/Theano-0.6.0-py2.7.egg/Theano/compile/function\u module.py”,第1332行,在orig\u函数中
默认值)
文件“/usr/local/lib/python2.7/dist packages/Theano-0.6.0-py2.7.egg/Theano/compile/function_module.py”,第1198行,在create中
_fn,_i,_o=self.linker.make\u thunk(输入存储=输入存储列表)
文件“/usr/local/lib/python2.7/dist packages/Theano-0.6.0-py2.7.egg/Theano/gof/link.py”,第489行,make_thunk
输出存储=输出存储)[:3]
文件“/usr/local/lib/python2.7/dist packages/Theano-0.6.0-py2.7.egg/Theano/gof/vm.py”,第881行,make_all
不可回收)
文件“/usr/local/lib/python2.7/dist packages/Theano-0.6.0-py2.7.egg/Theano/gof/op.py”,第618行,make_thunk
输出\存储=节点\输出\存储)
文件“/usr/local/lib/python2.7/dist packages/Theano-0.6.0-py2.7.egg/Theano/gof/cc.py”,第987行,make_thunk
保持锁定=保持锁定)
文件“/usr/local/lib/python2.7/dist packages/Theano-0.6.0-py2.7.egg/Theano/gof/cc.py”,第930行,在__
保持锁定=保持锁定)
文件“/usr/local/lib/python2.7/dist packages/Theano-0.6.0-py2.7.egg/Theano/gof/cc.py”,第1367行,位于cthunk_工厂
key=key,fn=self.compile\u cmodule\u by\u step,keep\u lock=keep\u lock)
文件“/usr/local/lib/python2.7/dist-packages/Theano-0.6.0-py2.7.egg/Theano/gof/cmodule.py”,第1005行,模块_中,从_键开始
模块=下一步(编译步骤)
文件“/usr/local/lib/python2.7/dist packages/Theano-0.6.0-py2.7.egg/Theano/gof/cc.py”,第1282行,按步骤编译模块
预RGS=预RGS)
文件“/usr/local/lib/python2.7/dist packages/Theano-0.6.0-py2.7.egg/Theano/gof/cmodule.py”,第1993行,编译
返回dlimport(lib_文件名)
dlimport中的文件“/usr/local/lib/python2.7/dist packages/Theano-0.6.0-py2.7.egg/Theano/gof/cmodule.py”,第290行
rval=uuu导入(模块名称,{},{},{},[模块名称])
ImportError:(“编译节点时发生以下错误”,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/0e96d34cc9a5edba0ae9e735b210a70.so:
未定义符号:“[Dot22(,P)]”

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


有关更详细的说明,请参阅《无安装指南》的一部分。

是否已安装libgfortran3?它似乎试图与系统或安装中不存在的其他库进行链接。(我发现您不太可能需要为此安装gfortran,但值得检查/尝试。)实际上,这看起来是一个非常好的类似问题:谢谢,我会检查它!还有,你好,Derek.aaaa和Theano安装指南(搜索gfortran)中的相关建议:哦,糟了,我甚至没看谁在问。真奇怪。小世界。