Skip to content
Advertisement

stderr output from native app classifier: ModuleNotFoundError: No module named ‘nltk’

While trying to send/receive data using native messaging between javascript and python for a firefox extension I keep running into the following error in the browser console-

stderr output from native app classifier: ModuleNotFoundError: No module named ‘nltk’

I have installed nltk in my pycharm virtual environment. I want to use nltk for some text processing in the python file used for native messaging. I dont get any error messages for other packages like sys, json, struct. But I get error messages for nltk, keras. But there is no error for pandas!!

Native messaging works fine when I dont import nltk into python.

Following is the python code. I have not shared nltk part of the code here

JavaScript

js file

JavaScript

addon manifest.json file-

JavaScript

following are the bat and json file for native app-

JavaScript
JavaScript

Advertisement

Answer

Actually I got it. The path that python was pointing to did not have nltk and keras. The plugin was using python from system path not from the virtual environment as I thought.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement