按照教程来 链接
最好更新下pip版本,避免出现问题:
pip install --upgrade pip
如果出现 Script file 'D:\software\anaconda3\envs\TF_GPU_1.14.0\Scripts\pip-script.py' is not present.
执行
python -m pip install --upgrade pip
或者
python -m ensurepip --default-pip # 重新安装pip,一般可以解决问题
或者
easy_install pip
# 如果上面命令无效 ,可以使用下面的命令
easy_install -i https://mirrors.aliyun.com/pypi/simple pip
安装 tensorflow-gpu==1.14.0
pip install tensorflow-gpu==1.14.0 -i https://pypi.tuna.tsinghua.edu.cn/simple/
注意有些tensflow版本需要和cuda版本对应
各个版本tensorflow-gpu对应cuda/cudnn的安装
给当前虚拟环境中安装cudatoolkits11.2和对应的cudann,在main和conda-forge频道中寻找要安装的软件包。
conda install cudatoolkit=11.2 cudnn -c conda-forge