【发布时间】:2019-08-13 17:53:47
【问题描述】:
我使用 Pip install TFlearn 并在我的 Raspberry Pi 上运行我的代码,但它显示
没有名为 tflearn 的模块
视频:https://www.youtube.com/watch?v=wypVcNIH6D4&t=3s
代码:
import nltk
from nltk.stem.lancaster import LancasterStemmer
stemmer = LancasterStemmer()
import numpy
import tflearn
import tensorflow
import random
import json
{"intents": [
{"tag": "greeting",
"patterns": ["Hi", "How are you", "Is anyone there?", "Hello", "Good day", "Whats up"],
"responses": ["Hello!", "Good to see you again!", "Hi there, how can I help?"],
"context_set": ""
},
{"tag": "goodbye",
"patterns": ["cya", "See you later", "Goodbye", "I am Leaving", "Have a Good day"],
"responses": ["Sad to see you go :(", "Talk to you later", "Goodbye!"],
"context_set": ""
},
{"tag": "age",
"patterns": ["how old", "how old is tim", "what is your age", "how old are you", "age?"],
"responses": ["I am 18 years old!", "18 years young!"],
"context_set": ""
},
{"tag": "name",
"patterns": ["what is your name", "what should I call you", "whats your name?"],
"responses": ["You can call me Tim.", "I'm Tim!", "I'm Tim aka Tech With Tim."],
"context_set": ""
},
{"tag": "shop",
"patterns": ["Id like to buy something", "whats on the menu", "what do you reccommend?", "could i get something to eat"],
"responses": ["We sell chocolate chip cookies for $2!", "Cookies are on the menu!"],
"context_set": ""
},
{"tag": "hours",
"patterns": ["when are you guys open", "what are your hours", "hours of operation"],
"responses": ["We are open 7am-4pm Monday-Friday!"],
"context_set": ""
}
]
}
【问题讨论】:
-
你如何运行你的代码?您是在命令行中输入
python myscript.py,还是使用IDE 或其他方式? -
我确实 pip install tflearn
-
这就是你安装 tflearn 包的方式,但我问你是如何运行你的代码。
标签: python tensorflow raspberry-pi tflearn