通过阿里云镜像安装:
sudo python3 -m pip --default-timeout=1000 install --index-url https://mirrors.aliyun.com/pypi/simple tensorflow==2.4.0
如果存在six库问题,使用参数–ignore-installed来忽略本地安装的six:“--ignore-installed six”
Installing collected packages: six
Found existing installation: six 1.4.1
DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling six-1.4.1:
...
通过清华镜像安装:
pip3 install tensorflow==2.4.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
备注:清华镜像站不知何种原因,速度很慢,时常下载超时,导致安装不成功。