My folder directory is as such
/maindir
__init__.py
settings.py
start
/run.py
/venv
.. other directories for flask here bin,include..etc
/app
__init__.py
main.py
views.py
/nbc
/__init__.py
naivebayesclassifier.py
The naivebayesclassifier.py module uses the nltk library as such
from nltk.probability import ELEProbDist, FreqDist
import nltk
from collections import defaultdict
from os import listdir
from os.path import isfile, join
I'm having an issue where if I try to run the program directly from going into /app and running
python main.py
which further goes on to include nbc and use it, I have no problems.
However when I try to deploy this along with flask. I move one directory out and run ./start, which has the following
. venv/bin.activate
./run.py
and run.py has the following
#!venv/bin/python
from app import app
app.run(debug = True)
This has worked before I included the nltk library, however now it gives me the error saying
ImportError: No module named nltk.probability
I had installed nltk using
sudo pip install -U pyyaml nltk
but I feel I'm missing some installation somewhere to make it work while deploying.