pytorch_transformers安装

pytorch_transformers安装步骤:
首先安装torch,详细步骤为见博客(https://blog.csdn.net/cuixing001/article/details/81952116)
进行pytorch_transformers安装时,一般情况下只需在命令行输入

pip install pytorch_transformers

即可,但是有时候也会出现以下错误:

ERROR: Could not find a version that satisfies the requirement regex (from pytorch_transformers) (from versions: none)
ERROR: No matching distribution found for regex (from pytorch_transformers)

出现此类问题,是因为pip没有换源(之前更新pip时就出现了这种问题)因此解决办法有两个:
第一,对pip进行换源,然后直接pip install pytorch_transformers
第二,指定源进行安装:
pip install pytorch_transformers -i https://pypi.douban.com/simple
pytorch_transformers安装_第1张图片

你可能感兴趣的:(pip,python)