Python 2.7 simstring模块安装失败

Python 2.7 simstring模块安装失败,python-2.7,python-3.x,anaconda,python-module,spyder,Python 2.7,Python 3.x,Anaconda,Python Module,Spyder,我想用可下载的源代码安装用于近似字符串检索的包。到目前为止,我只安装了带有easy\u install的软件包。这是我第一次尝试从安装文件安装模块。。。我失败了,为什么 $ Users/./Downloads/simstring-1.0/swig/python/setup.py.in build_ext --inplace running build_ext building '_simstring' extension g++ -fno-strict-aliasing

我想用可下载的源代码安装用于近似字符串检索的包。到目前为止,我只安装了带有
easy\u install
的软件包。这是我第一次尝试从安装文件安装模块。。。我失败了,为什么

$ Users/./Downloads/simstring-1.0/swig/python/setup.py.in build_ext --inplace
    running build_ext
    building '_simstring' extension
    g++ -fno-strict-aliasing -I//anaconda/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/./Downloads/simstring-1.0/include -I//anaconda/include/python2.7 -c export.cpp -o build/temp.macosx-10.5-x86_64-2.7/export.o
    clang: error: no such file or directory: 'export.cpp'
    clang: error: no input files
    error: command 'g++' failed with exit status 1
编辑:23.06.2015

对Python3.4和新Xcode7的新尝试。我收到的一长串错误。如何修复g++编译器

$ python3 setup.py build_ext 
running build_ext
building '_simstring' extension
g++ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -I/Users/.../Downloads/simstring-1.0/include -I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -c export.cpp -o build/temp.macosx-10.6-intel-3.4/export.o
g++ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Qunused-arguments -Qunused-arguments -I/Users/.../Downloads/simstring-1.0/include -I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -c export_wrap.cpp -o build/temp.macosx-10.6-intel-3.4/export_wrap.o
export_wrap.cpp:883:33: error: use of undeclared identifier 'PyString_AsString'
    PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
                                ^
export_wrap.cpp:1274:9: error: use of undeclared identifier 'PyClass_Check'
    if (PyClass_Check(obj)) {
        ^
export_wrap.cpp:1347:24: error: use of undeclared identifier
      'PyString_FromString'
      PyObject *ofmt = PyString_FromString(fmt);
                       ^
export_wrap.cpp:1349:8: error: use of undeclared identifier 'PyString_Format'
        res = PyString_Format(ofmt,args);
              ^
export_wrap.cpp:1379:84: error: use of undeclared identifier 'PyString_AsString'
  ...PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name, PyString...
                                                                     ^
export_wrap.cpp:1387:5: error: use of undeclared identifier
      'PyString_ConcatAndDel'; did you mean 'PyBytes_ConcatAndDel'?
    PyString_ConcatAndDel(&repr,nrep);
    ^~~~~~~~~~~~~~~~~~~~~
    PyBytes_ConcatAndDel
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/bytesobject.h:62:18: note: 
      'PyBytes_ConcatAndDel' declared here
PyAPI_FUNC(void) PyBytes_ConcatAndDel(PyObject **, PyObject *);
                 ^
export_wrap.cpp:1401:11: error: use of undeclared identifier 'PyString_AsString'
    fputs(PyString_AsString(repr), fp);
          ^
export_wrap.cpp:1414:5: error: use of undeclared identifier
      'PyString_FromString'
    PyString_FromString(result) : 0;
    ^
export_wrap.cpp:1623:6: error: use of undeclared identifier 'coercion'
    (coercion)0,   /*nb_coerce*/
     ^
export_wrap.cpp:1656:3: error: use of undeclared identifier 'cmpfunc'
        (cmpfunc)PySwigObject_compare,      /* tp_compare */ 
         ^
export_wrap.cpp:1703:23: error: no member named 'ob_type' in '_typeobject'
    pyswigobject_type.ob_type = &PyType_Type;
    ~~~~~~~~~~~~~~~~~ ^
export_wrap.cpp:1752:12: error: use of undeclared identifier
      'PyString_FromFormat'
    return PyString_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
           ^
export_wrap.cpp:1754:12: error: use of undeclared identifier
      'PyString_FromFormat'
    return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
           ^
export_wrap.cpp:1763:12: error: use of undeclared identifier
      'PyString_FromFormat'
    return PyString_FromFormat("%s%s", result, v->ty->name);
           ^
export_wrap.cpp:1765:12: error: use of undeclared identifier
      'PyString_FromString'
    return PyString_FromString(v->ty->name);
           ^
export_wrap.cpp:1819:3: error: use of undeclared identifier 'cmpfunc'
        (cmpfunc)PySwigPacked_compare,      /* tp_compare */    
         ^
export_wrap.cpp:1866:23: error: no member named 'ob_type' in '_typeobject'
    pyswigpacked_type.ob_type = &PyType_Type;
    ~~~~~~~~~~~~~~~~~ ^
export_wrap.cpp:1911:10: error: use of undeclared identifier
      'PyString_FromString'
  return PyString_FromString("this");
         ^
export_wrap.cpp:1931:9: error: use of undeclared identifier 'PyInstance_Check';
      did you mean 'PySequence_Check'?
    if (PyInstance_Check(pyobj)) {
        ^~~~~~~~~~~~~~~~
        PySequence_Check
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/abstract.h:923:22: note: 
      'PySequence_Check' declared here
     PyAPI_FUNC(int) PySequence_Check(PyObject *o);
                     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command 'g++' failed with exit status 1 
$python3 setup.py build\u ext
运行build_ext
正在生成“\u simstring”扩展
g++-DNDEBUG-g-fwrapv-O3-Wall-Wstrict原型-量子化参数-量子化参数-I/Users/../Downloads/simstring-1.0/include-I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m-c export.cpp-o build/temp.macosx-10.6-intel-3.4/export.o
g++-DNDEBUG-g-fwrapv-O3-Wall-Wstrict原型-量子化参数-量子化参数-I/Users/../Downloads/simstring-1.0/include-I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m-c export_wrap.cpp-o build/temp.macosx-10.6-intel-3.4/export_wrap.o
export_wrap.cpp:883:33:错误:使用未声明的标识符“PyString_AsString”
PyErr_格式(类型为“%s%s”,PyString_AsString(old_str),mesg);
^
export_wrap.cpp:1274:9:错误:使用未声明的标识符“PyClass_Check”
if(PyClass_检查(obj)){
^
export_wrap.cpp:1347:24:错误:使用未声明的标识符
“PyString_FromString”
PyObject*ofmt=PyString_FromString(fmt);
^
export_wrap.cpp:1349:8:错误:使用未声明的标识符“PyString_格式”
res=PyString_格式(ofmt,args);
^
export_wrap.cpp:1379:84:错误:使用未声明的标识符“PyString_AsString”
…PyString\u FromFormat(“,名称,PyString…”。。。
^
export_wrap.cpp:1387:5:错误:使用未声明的标识符
“PyString_ConcatAndDel”;你是说“PyBytes_ConcatAndDel”吗?
PyString_ConcatAndDel(&repr,nrep);
^~~~~~~~~~~~~~~~~~~~~
PyBytes_ConcatAndDel
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/bytesobject.h:62:18:注意:
此处声明了“PyBytes\u ConcatAndDel”
PyAPI_FUNC(void)PyBytes_ConcatAndDel(PyObject**,PyObject*);
^
export_wrap.cpp:1401:11:错误:使用未声明的标识符“PyString_AsString”
fputs(PyString_AsString(repr),fp);
^
export_wrap.cpp:1414:5:错误:使用未声明的标识符
“PyString_FromString”
PyString_FromString(结果):0;
^
export_wrap.cpp:1623:6:错误:使用未声明的标识符“强制”
(强制)0,/*nb_强制*/
^
export_wrap.cpp:1656:3:错误:使用未声明的标识符“cmpfunc”
(cmpfunc)PySwigObject_compare,/*tp_compare*/
^
export\u wrap.cpp:1703:23:错误:在“\u typeobject”中没有名为“ob\u type”的成员
pyswigobject_type.ob_type=&PyType_type;
~~~~~~~~~~~~~~~~~ ^
export_wrap.cpp:1752:12:错误:使用未声明的标识符
“PyString\u FromFormat”
从format(“”,result,v->ty->name)返回PyString\u;
^
export_wrap.cpp:1754:12:错误:使用未声明的标识符
“PyString\u FromFormat”
从格式(“,v->ty->name”)返回PyString_;
^
export_wrap.cpp:1763:12:错误:使用未声明的标识符
“PyString\u FromFormat”
从format(“%s%s”,result,v->ty->name)返回PyString\u;
^
export_wrap.cpp:1765:12:错误:使用未声明的标识符
“PyString_FromString”
从字符串返回PyString_(v->ty->name);
^
export_wrap.cpp:1819:3:错误:使用未声明的标识符“cmpfunc”
(cmpfunc)PySwigPacked_compare,/*tp_compare*/
^
export\u wrap.cpp:1866:23:错误:在“\u typeobject”中没有名为“ob\u type”的成员
pyswigpacked_type.ob_type=&PyType_type;
~~~~~~~~~~~~~~~~~ ^
export_wrap.cpp:1911:10:错误:使用未声明的标识符
“PyString_FromString”
从字符串(“this”)返回PyString_;
^
export_wrap.cpp:1931:9:错误:使用未声明的标识符'PyInstance_Check';
你是说“PySequence_Check”吗?
if(pyobj){
^~~~~~~~~~~~~~~~
PYU校验
/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m/abstract.h:923:22:注意:
此处声明了'PySequence_Check'
PyAPI_FUNC(int)PySequence_Check(PyObject*o);
^
致命错误:发出的错误太多,正在停止[-ferror limit=]
产生了20个错误。
错误:命令“g++”失败,退出状态为1

你在哪个操作系统上工作?你可能需要安装一个编译器,gcc-c++之类的。对不起……从输出的第四行就可以看出这一点。我在OS X 10.9.5上。在哪里可以找到这样的编译器?我去掉了anaconda,重新安装了Python2.7和3.4,更新了Xcode…问题仍然存在。
pip
&
 easy_install
顺便说一句,安装工作正常……也许我在安装过程中做错了什么?我猜simstring不支持Python 3。我正在尝试2.7和3.4