把pip源换成阿里的就好了,原来的要用ssl模块,换了就不用了
新建~/.pip/pip.conf
文件
写入
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
或者pip3 install时加上-i
./pip3 install tensorflow-gpu==2.11.0 -i http://mirrors.aliyun.com/pypi/simple/