Note that there are some explanatory texts on larger screens.

plurals
  1. POimport Error while importing python nltk module in node.js using "python-node" module
    primarykey
    data
    text
    <p>I am trying to import python natural language processing toolkit nltk in node.js using node-python mentioned here: <a href="https://npmjs.org/package/node-python" rel="nofollow noreferrer">https://npmjs.org/package/node-python</a></p> <p>The commands i am giving are similar as mentioned on the npm module site:</p> <pre><code>var python = require('node-python'); var os = python.import('os'); </code></pre> <p>i am getting the following error:</p> <pre><code>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.&lt;anonymous&gt; (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) </code></pre> <p>I am using python2.7.2 After much search i found that this is a known bug in python2.7 and found a similar problem when importing from <code>C</code> here is the what i found: <a href="https://stackoverflow.com/questions/11842920/undefined-symbol-pyexc-importerror-when-embedding-python-in-c">similar error found while importing python datetime module from <code>C</code></a></p> <p>The problem seems to be in the datetime.so module, i was thinking of getting the updated version of the datetime module and compiling it separately to make it work. I am still looking for that module and comple instructions. I would really appreciate If anyone has a better suggestion to resolve this or even help me locate the place to find this datetime module and its compile instructions. I really don't want to compile the whole python to make it work.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload