利用清华源的pip镜像快速安装transformers源码

利用清华源的pip镜像快速安装transformers源码

因为网络的问题,因此如果下载源直接安装极为麻烦,因此可以先用镜像安装

例如: pip install transformers -i https://pypi.tuna.tsinghua.edu.cn/simple

这样依赖都已经安好

然后 pip uninstall transformers

然后再git clone https://github.com/huggingface/transformers.git

在目录下,再python setup.py install 即可。

*即使是进行了长久配置

python -m pip install –upgrade pip
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

有时也会出现在安装源码时自动去pypi上,从而无法使用镜像。

三符风云涌

Leave a Reply