使用“python-node”模块在node.js中导入python nltk模块时导入错误

时间:2013-12-22 08:57:33

标签: python node.js datetime python-2.7 nltk

我正在尝试使用此处提到的node-python在node.js中导入python自然语言处理工具包nltk:https://npmjs.org/package/node-python

我给出的命令与npm模块网站上提到的相似:

var python = require('node-python');
var os = python.import('os');

我收到以下错误:

Error: /usr/lib/python2.7/lib-dynload/datetime.so: undefined symbol: PyExc_SystemError
    at repl:1:25
    at REPLServer.self.eval (repl.js:109:21)
    at rli.on.self.bufferedCmd (repl.js:258:20)
    at REPLServer.self.eval (repl.js:116:5)
    at Interface.<anonymous> (repl.js:248:12)
    at Interface.EventEmitter.emit (events.js:96:17)
    at Interface._onLine (readline.js:200:10)
    at Interface._line (readline.js:518:8)
    at Interface._ttyWrite (readline.js:736:14)
    at ReadStream.onkeypress (readline.js:97:10)

我正在使用python2.7.2 经过大量搜索,我发现这是python2.7中的一个已知错误,并且从C导入时发现类似的问题,这是我发现的: similar error found while importing python datetime module from C

问题似乎在datetime.so模块中,我正在考虑获取datetime模块的更新版本并单独编译它以使其工作。我仍然在寻找那个模块和补充说明。我真的很感激如果有人有更好的建议来解决这个问题,甚至帮我找到这个地方找到这个日期时间模块及其编译说明。我真的不想编译整个python来使它工作。

0 个答案:

没有答案