kengz / spacy-nlp

Expose Spacy nlp text parsing to Nodejs (and other languages) via socketIO
MIT License
225 stars 58 forks source link

ModuleNotFoundError: No module named 'websocket' #28

Open deemeetree opened 4 years ago

deemeetree commented 4 years ago

Followed your instructions and when I node index.js launch the index.js file with

const spacyNLP = require("spacy-nlp");
// default port 6466
// start the server with the python client that exposes spacyIO (or use an existing socketIO server at IOPORT)
var serverPromise = spacyNLP.server({ port: process.env.IOPORT });
// Loading spacy may take up to 15s

I get the following error:

[Fri Jun 05 2020 13:50:21 GMT+0200 (Central European Summer Time)] ERROR Traceback (most recent call last):
  File "/Users/deemeetree/Documents/Root/spacyorig/node_modules/spacy-nlp/src/client.py", line 12, in <module>
    import websocket
ModuleNotFoundError: No module named 'websocket'

Even though websocket was installed on my system.

Why is that?

thomasrosen commented 4 years ago

Installing the missing dependencies resolved it for me.

Is client.py maybe not finding websocket?

I don't know your environment but this article solved my path problems on mac: https://opensource.com/article/19/5/python-3-default-mac