tensorlayer / seq2seq-chatbot

Chatbot in 200 lines of code using TensorLayer
https://github.com/tensorlayer/tensorlayer
836 stars 316 forks source link

Error: No module named twitter #10

Open andrewt3000 opened 6 years ago

andrewt3000 commented 6 years ago

python main_simple_seq2seq.py Traceback (most recent call last): File "main_simple_seq2seq.py", line 18, in from data.twitter import data ImportError: No module named twitter

andrewt3000 commented 6 years ago

I see this is a closed issue, but I am python noob, and knowing where the files are doesn't help me. You would think it would search from current directory and find it??? Should there be a change to an init file? Can this be resolved with a change to the code or config?

https://github.com/tensorlayer/seq2seq-chatbot/issues/3

JDSlimz commented 6 years ago

It appears that you need to make sure you are using python3. By default, Ubuntu runs python v2 when you just call python. To get this app to run correctly, try python3 main.py with your arguments.

To make sure all of your modules are installed you will need to install them using pip3.

pskrunner14 commented 6 years ago

For python2, you will need to do this instead:

import imp
data = imp.load_source('data.twitter.data', 'data/twitter/data.py')