Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'keras_text_summarization' #10

Open
avinsit123 opened this issue Oct 24, 2018 · 5 comments
Open

No module named 'keras_text_summarization' #10

avinsit123 opened this issue Oct 24, 2018 · 5 comments

Comments

@avinsit123
Copy link

@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?

@bikramkhastgir
Copy link

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.

@TuanHAnhVN
Copy link

@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('../')

@avigoen
Copy link

avigoen commented Feb 4, 2019

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

@bikramkhastgir
Copy link

As @hoanganhtuanfsoft wrote, try running it after adding "import sys sys.path.append('../')" at the top of your code.

@lainisourgod
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants