安装好cuda和cudnn后,安装tensorflow的一些问题

安装tensorflow时, 遇到ERROR: Cannot uninstall ‘wrapt‘. It is a distutils installed project and thus we

import tensorflow as tf 时遇到  ModuleNotFoundError: No module named 'numpy.core._multiarray_umath' 


0. 安装cuda和cudnn

1.下载 2018-12-Windows-x86_64.exe

Index of /icon-default.png?t=LA92https://repo.anaconda.com/archive/

2. 安装anaconda并以管理员身份启动anaconda prompt:

3. 升级 pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py  
python get-pip.py

4. 解决无法卸载wrapt的问题
pip install  -i https://pypi.tuna.tsinghua.edu.cn/simple -U --ignore-installed wrapt enum34 simplejson netaddr

5. 解决numpy版本不适配的问题
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  --upgrade numpy

6. 调动出最新版本tensorflow的版本号:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==4

比如2021-11-20日,调出来的最高版本是2.7.0

7. 安装tensorflow
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==2.7.0

Guess you like

Origin blog.csdn.net/eloudy/article/details/121438550