Import Error importing python nltk module into node.js using the python-node module

I am trying to import the nltk toolkit for processing the python natural language into node.js using the node -python mentioned here: https://npmjs.org/package/node-python

The commands that I give are similar to those indicated on the npm module website:

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

I get the following error:

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)

I am using python2.7.2 After searching many times, I found that this is a known error in python2.7 and found a similar problem when importing from Chere is what I found: a similar error when importing a python datetime module fromC

, , datetime.so, datetime , . . - , datetime . python, .

+4

All Articles