keras-text-summarization
keras-text-summarization copied to clipboard
No module named 'keras_text_summarization'
@chen0040 When I run the program on the terminal using the commands given in the readme,it shows the error :
File "seq2seq_glove_train.py", line 5, in
I got similar error. So basically it happens due to mismatch in the relative path. Are you using Python 2.7? To resolve it, goto the base folder 'keras-text-summarization' and then use a forward path to run the program like 'python demo/seq2seq_train.py'.
But i am getting another error. "No module named request". I am currently checking if this is due to python version or library dependency, as i already have 'urllib'. Check if you are getting the same error.
@chen0040 When I run the program on the terminal using the commands given in the readme,it shows the error : File "seq2seq_glove_train.py", line 5, in from keras_text_summarization.library.utility.plot_utils import plot_and_save_history ImportError: No module named 'keras_text_summarization' Can you please look into the matter and tell what is wrong?
you need to read again about code. I think this error can be solved easily.
Add extra code:
import sys sys.path.append('../')
I got similar error. So basically it happens due to mismatch in the relative path. Are you using Python 2.7? To resolve it, goto the base folder 'keras-text-summarization' and then use a forward path to run the program like 'python demo/seq2seq_train.py'.
But i am getting another error. "No module named request". I am currently checking if this is due to python version or library dependency, as i already have 'urllib'. Check if you are getting the same error.
I still got the same error doing it your way
As @hoanganhtuanfsoft wrote, try running it after adding "import sys sys.path.append('../')" at the top of your code.
The actual problem is that package 'keras_text_summarization' needs to be installed in order to be used.
Just type in python setup.py install in the root folder of the project.
Source: https://stackoverflow.com/questions/51157258/no-module-named-keras-text-summarization-when-running-keras-text-summarization