wxpy:
https://blog.csdn.net/jiangop/article/details/77992716
chatterbot语料库
https://github.com/gunthercox/chatterbot-corpus/tree/master/chatterbot_corpus/data
进阶篇
https://blog.csdn.net/silence2330/article/details/79739553
DeepQA:
https://github.com/Conchylicultor/DeepQA
http://blog.sina.com.cn/s/blog_661cda4d010125u7.html
jieba分词和word2vec词向量
https://www.jianshu.com/p/d4433aa2705d
window上安装tensorflow cpu版本
https://blog.csdn.net/wust_lh/article/details/80408505
wechatbot
https://pypi.org/project/wechatbot/1.0.10/
easywechat
https://www.easywechat.com/docs/4.1/official-account/reply
https://blog.csdn.net/cindy647/article/details/89506804(精)
**pip install --upgrade pip
没有升级的情况下,没法下载安装
下载即可。
Hamcrest是一个测试工具,这是一个用于编写断言的框架。最初是为基于 Java 的单元测试而发明的,但它现在支持多种语言,包括 Python(即pyhamcrest)。Hamcrest 旨在使测试断言更容易编写和更精确。详情:
https://blog.csdn.net/hustzw07/article/details/79145253
下载 pyhamcrest 时出现的错误,详细的错误:
ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
错误:无法卸载“pyyaml”。这是一个distutils安装的项目,因此我们无法准确地确定哪些文件属于它,这只会导致部分卸载。
Distutils可以用来在Python环境中构建和安装额外的模块。新的模块可以是纯Python的,也可以是用C/C++写的扩展模块,或者可以是Python包,包中包含了由C和Python编写的模块。
https://blog.csdn.net/weixin_41923961/article/details/80377176
YAML 是专门用来写配置文件的语言,非常简洁和强大,远比 JSON 格式方便。
YAML在python语言中有PyYAML安装包。
https://www.cnblogs.com/BlueSkyyj/p/8143826.html
pip版本和certifi之间存在依赖关系(可能),结决方法有三个
1、尝试将pip降级到9.0.1版,然后安装graphlab.
降级:pip install pip == 9.0.1
2、pip install --ignore-installed 库名(尝试的)https://blog.csdn.net/qq_37193537/article/details/90295114
3、删除文件html5lib-0.999-py3.6.egg-info
地址在program/anaconda/Lib/site-package
windows下安装可以用GitHub desktop 安装
在命令行窗口打开下载目录
执行pip install -r requirements.txt //pip 本地安装
其中requirements.txt是文件的依赖关系
错误详情
ERROR: Command errored out with exit status 1:
command: ‘e:\program\anaconda\python.exe’ -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\草木 灰\AppData\Local\Temp\pip-install-md9nxll3\wsgiref\setup.py’"’"’; file=’"’"‘C:\Users\草木灰\AppData\Local\Temp\pip-install-md9nxll3\wsgiref\setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)(file);code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ egg_info --egg-base ‘C:\Users\草木灰\AppData\Local\Temp\pip-install-md9nxll3\wsgiref\pip-egg-info’
cwd: C:\Users\草木灰\AppData\Local\Temp\pip-install-md9nxll3\wsgiref
Complete output (8 lines):
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\草木灰\AppData\Local\Temp\pip-install-md9nxll3\wsgiref\setup.py”, line 5, in
import ez_setup
File “C:\Users\草木灰\AppData\Local\Temp\pip-install-md9nxll3\wsgiref\ez_setup_init_.py”, line 170
print “Setuptools version”,version,“or greater has been installed.”
^
SyntaxError: Missing parentheses in call to ‘print’. Did you mean print(“Setuptools version”,version,“or greater has been installed.”)?
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
原因分析:
看介绍:https://pypi.org/project/wsgiref/
支持 Python版本<3.2 //不支持3,好像也可以不降级用改代码的方式实现
你的版本是3.7.0
解决方法:
(降级)
http://f.dataguru.cn/thread-841874-1-1.html
from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
# Create a new chat bot named Charlie
chatbot = ChatBot('Charlie')
trainer = ListTrainer(chatbot)
trainer.train([
"Hi, can I help you?",
"Sure, I'd like to book a flight to Iceland.",
"Your flight has been booked."
])
# Get a response to the input text 'I would like to book a flight.'
response = chatbot.get_response('I would like to book a flight.')
print(response)
错误详情:ModuleNotFoundError: No module named ‘chatterbot_corpus’
解决方法:pip3 install chatterbot_corpus
电脑同时有多个版本的 python 时,pip3 可以自动判别用 python3 来安装库,是为了避免同 python2 发生冲突。
如果你的电脑仅仅安装了 python3,使用 pip 或者 pip3 是一样的。
又是在上一步安装时报错:
ERROR: chatterbot 1.0.5 has requirement pyyaml<5.2,>=5.1, but you'll have pyyaml 3.13 which is incompatible.
Installing collected packages: PyYAML, chatterbot-corpus
Found existing installation: PyYAML 5.1.2
Uninstalling PyYAML-5.1.2:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'e:\\program\\anaconda\\lib\\site-packages\\_yaml.cp37-win_amd64.pyd'
Consider using the `--user` option or check the permissions.
可能是之前安装anaconda是遗留的安装包,与新的冲突了
解决有点不明不白
pip uninstall PyYAML
pip3 install chatterbot_corpus
成了!!!!
该来的还是会来的,ModuleNotFoundError: No module named 'yaml’
查看版本显示3.13
pip show pyyaml
Name: PyYAML
Version: 3.13
升级又出现问题
C:\Users\草木灰>pip install --upgrade PyYAML
...
ERROR: chatterbot-corpus 1.2.0 has requirement PyYAML<4.0,>=3.12, but you'll have pyyaml 5.1.2 which is incompatible.
Installing collected packages: PyYAML
Found existing installation: PyYAML 3.13
ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
好了,和安装chatterbot时出现的第三个错误一个套路,解决!!!
经验教训:一定要看GitHub说明文档,不要因为是英语而畏惧,其实说明都很简单的
Chatterbot is a very flexible and dynamic chatbot that you easily can create your own training data and structure.
Create or copy an existing .yml file and put that file in a existing or a new directory you created under chatterbot_corpus\data
In the beginning of the file you set one or two categories.
categories:
- myown
- my own categories
Then can you start your actual training conversation data.
conversations:
-- Hello
- Hello
-- Hi
- Hello