当前位置:   article > 正文

DeprecationWarning错误解决方法_deprecationwarning: 'telnetlib' is deprecated and

deprecationwarning: 'telnetlib' is deprecated and slated for removal in pyth

今天在nltk的应用中出现了以下问题:

D:\Program Files (x86)\anaconda\lib\site-packages\sklearn\feature_extraction\text.py:17: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Mapping, defaultdict
showing info https://raw.githubusercontent.com/nltk/nltk_data/gh-pages/index.xml

  • 1
  • 2
  • 3
  • 4

点击pycharm给出的网址不可访问,那应该怎么解决呢?
错误的提示是因为版本更新发出的警告,可以忽略,不影响后续使用。如果要解决的话找到错误中给出的文件路径,找到text.py文件,原来的文件代码如下:
from collections import Mapping, defaultdict改为from collections.abc import Mapping, defaultdict就可以解决了

参考链接

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/367848
推荐阅读
相关标签
  

闽ICP备14008679号