环境搭建报错处理
-
scipy的该方法,在新版本中被删除。回到旧版本
"ImportError: cannot import name 'triu' from 'scipy.linalg'" when importing Gensim
处理:
以下方法任选其一即可
-
pip install scipy==1.10.1
-
pip install scipy==1.12
-
conda install "scipy<1.13"
-
缺模块
-
缺少openpyxl
-
处理:
-
conda install openpyxl -y
-
或者 pip install openpyxl -y
-
-
-
ModuleNotFoundError: No module named 'xlrd'
-
处理:conda install xlrd -y
-
-
conda install pytables
-
-
缺少stoplist.txt
FileNotFoundError: [Errno 2] No such file or directory: 'stoplist.txt'
处理:从老师学习通下载stopword.txt,然后复制到.py文件相同的文件夹中,并改名stoplist.txt
-
字典问题
python使用结巴中文分词以及训练自己的分词词典 - pytorch中文网
找到一个别人的字典下载链接https://github.com/fxsjy/jieba/raw/master/extra_dict/dict.txt.small