(1)提示错误:
ModuleNotFoundError: No module named 'torchtext'
解决办法,笔者的pycharm与anaconda的interpreter是同一个路径,故在pycharm的terminal下,输入以下命令,安装Torchtext
pip install https://github.com/pytorch/text/archive/master.zip
可以参考官网:
https://pypi.org/project/torchtext/
(2) 提示错误
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)
解决办法:
# 全局取消证书验证
import ssl
ssl._create_default_https_context = ssl._create_unverified_context