这篇文章上次修改于 1036 天前,可能其部分内容已经发生变化,如有疑问可询问作者。
sudo apt install python3.8

python3.8 -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U

cd /usr/bin/
sudo cp pip3 pip3.6

sudo vim pip3

替换为以下内容:

#!/usr/bin/python3.8
# -*- coding: utf-8 -*-
import re
import sys

from pip._internal.cli.main import main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(main())
pip3 --version
$ pip 21.3.1 from /home/xxx/.local/lib/python3.8/site-packages/pip (python 3.8)

pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

pip3 install you-get

解决找不到命令问题:

you-get
$ zsh: command not found: you-get

.bashrc.zshrc文件末尾添加以下代码

export PATH="$HOME/.local/bin:$PATH"