SeanNaren / warp-ctc

Pytorch Bindings for warp-ctc
Apache License 2.0
757 stars 271 forks source link

do not support python3 #122

Closed jiangmiaotong closed 5 years ago

jiangmiaotong commented 5 years ago

I do a seriers of installation and have a suspicion that this package does not support python3 well: torch版本>= 1.0 python2 gcc6.4.1; gcc5.4.1; gcc4.9.2; cmake,make,install successfully python3 gcc 5.4.1: install error: gcc-5: error: unrecognized command line option ‘-fno-plt’
try gcc6.4.1: install error: src/binding.cpp:19:13: error: ‘Tensor’ is not a member of ‘torch’ int cpu_ctc(torch::Tensor probs, ^~~~~ src/binding.cpp:19:13: note: suggested alternatives: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:608:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^~ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:8, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^~ src/binding.cpp:20:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor grads, ^~~~~ src/binding.cpp:20:13: note: suggested alternatives: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:608:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^~ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:8, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^~ src/binding.cpp:21:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor labels, ^~~~~ src/binding.cpp:21:13: note: suggested alternatives: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:608:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^~ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:8, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^~ src/binding.cpp:22:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor label_sizes, ^~~~~ src/binding.cpp:22:13: note: suggested alternatives: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:608:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^~ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:8, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^~ src/binding.cpp:23:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor sizes, ^~~~~ src/binding.cpp:23:13: note: suggested alternatives: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:608:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^~ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:8, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^~ src/binding.cpp:24:13: error: expected primary-expression before ‘int’ int minibatch_size, ^~~ src/binding.cpp:25:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor costs, ^~~~~ src/binding.cpp:25:13: note: suggested alternatives: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:608:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^~ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:8, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^~ src/binding.cpp:26:13: error: expected primary-expression before ‘int’ int blank_label) ^~~ src/binding.cpp:26:28: error: expression list treated as compound expression in initializer [-fpermissive] int blank_label) ^ src/binding.cpp:66:13: error: ‘Tensor’ is not a member of ‘torch’ int gpu_ctc(torch::Tensor probs, ^~~~~ src/binding.cpp:66:13: note: suggested alternatives: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:608:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^~ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:8, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^~ src/binding.cpp:67:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor grads, ^~~~~ src/binding.cpp:67:13: note: suggested alternatives: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:608:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^~ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:8, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^~ src/binding.cpp:68:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor labels, ^~~~~ src/binding.cpp:68:13: note: suggested alternatives: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:608:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^~ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:8, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^~ src/binding.cpp:69:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor label_sizes, ^~~~~ src/binding.cpp:69:13: note: suggested alternatives: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:608:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^~ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:8, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^~ src/binding.cpp:70:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor sizes, ^~~~~ src/binding.cpp:70:13: note: suggested alternatives: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:608:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^~ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:8, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^~ src/binding.cpp:71:13: error: expected primary-expression before ‘int’ int minibatch_size, ^~~ src/binding.cpp:72:13: error: ‘Tensor’ is not a member of ‘torch’ torch::Tensor costs, ^~~~~ src/binding.cpp:72:13: note: suggested alternatives: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:608:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Tensor.h:40:18: note: ‘at::Tensor’ class CAFFE2_API Tensor { ^~ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/ScalarType.h:5:0, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Scalar.h:10, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/Type.h:8, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Type.h:2, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/Context.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/ATen/ATen.h:7, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/ATen/core/typeid.h:461:7: note: ‘caffe2::Tensor’ class Tensor; ^~ src/binding.cpp:73:13: error: expected primary-expression before ‘int’ int blank_label) ^~~ src/binding.cpp:73:28: error: expression list treated as compound expression in initializer [-fpermissive] int blank_label) ^ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h: In instantiation of ‘pybind11::module& pybind11::module::def(const char, Func&&, const Extra& ...) [with Func = int; Extra = {char [27]}]’: src/binding.cpp:109:58: required from here /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:806:75: error: no matching function for call to ‘pybind11::cpp_function::cppfunction(int, pybind11::name, pybind11::scope, pybind11::sibling, const char [27])’ sibling(getattr(this, name, none())), extra...); ^ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:79:5: note: candidate: template<class Return, class Class, class ... Arg, class ... Extra> pybind11::cpp_function::cpp_function(Return (Class::)(Arg ...) const, const Extra& ...) cpp_function(Return (Class::f)(Arg...) const, const Extra&... extra) { ^~~~ /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:79:5: note: template argument deduction/substitution failed: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:806:75: note: mismatched types ‘Return (Class::)(Arg ...) const’ and ‘int’ sibling(getattr(this, name_, none())), extra...); ^ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:72:5: note: candidate: template<class Return, class Class, class ... Arg, class ... Extra> pybind11::cpp_function::cpp_function(Return (Class::)(Arg ...), const Extra& ...) cppfunction(Return (Class::f)(Arg...), const Extra&... extra) { ^~~~ /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:72:5: note: template argument deduction/substitution failed: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:806:75: note: mismatched types ‘Return (Class::)(Arg ...)’ and ‘int’ sibling(getattr(this, name, none())), extra...); ^ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:65:5: note: candidate: template<class Func, class ... Extra, class> pybind11::cpp_function::cpp_function(Func&&, const Extra& ...) cpp_function(Func &&f, const Extra&... extra) { ^~~~ /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:65:5: note: template argument deduction/substitution failed: /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:58:5: note: candidate: template<class Return, class ... Args, class ... Extra> pybind11::cpp_function::cpp_function(Return ()(Args ...), const Extra& ...) cpp_function(Return (f)(Args...), const Extra&... extra) { ^~~~ /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:58:5: note: template argument deduction/substitution failed: In file included from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:806:75: note: mismatched types ‘Return(Args ...)’ and ‘int’ sibling(getattr(*this, name_, none())), extra...); ^ In file included from /usr/lib/python3.7/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:6:0, from /usr/lib/python3.7/site-packages/torch/lib/include/torch/extension.h:5, from src/binding.cpp:6: /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:54:5: note: candidate: pybind11::cpp_function::cpp_function(std::nullptr_t) cpp_function(std::nullptr_t) { } ^~~~ /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:54:5: note: candidate expects 1 argument, 5 provided /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:53:5: note: candidate: pybind11::cpp_function::cpp_function() cpp_function() { } ^~~~ /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:53:5: note: candidate expects 0 arguments, 5 provided /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: candidate: pybind11::cpp_function::cpp_function(const pybind11::cpp_function&) class cpp_function : public function { ^~~~ /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: candidate expects 1 argument, 5 provided /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: candidate: pybind11::cpp_function::cpp_function(pybind11::cpp_function&&) /usr/lib/python3.7/site-packages/torch/lib/include/pybind11/pybind11.h:51:7: note: candidate expects 1 argument, 5 provided error: command '/usr/bin/gcc-6' failed with exit status 1

jiangmiaotong commented 5 years ago

@SeanNaren looking forward to your reply.

jiangmiaotong commented 5 years ago

I change torch1.0.0a... to be 1.0.0 andsolve the problem