Quickly Install the transformers Source Code via Tsinghua's pip Mirror
Because of network issues, downloading the source and installing directly is extremely painful, so you can first install via a mirror.
For example: pip install transformers -i https://pypi.tuna.tsinghua.edu.cn/simple
This way all the dependencies are installed.
Then pip uninstall transformers
Then git clone https://github.com/huggingface/transformers.git
In that directory, run python setup.py install and you're done.
*Even after long-term configuration:
python -m pip install --upgrade pip
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
installing from source may still go to PyPI automatically, so the mirror cannot be used.