常用命令

  1. conda env list 当前已创建的环境列表
  2. conda create -n name 创建名称为name的环境
  3. conda remove -n name --all 删除名称为name的环境
  4. conda activate name 进入名为name的环境
  5. conda install cudatoolkit=10.1 在当前环境安装cuda10.1
  6. conda install cudnn=7.6 在当前环境安装cudnn7.6
  7. conda --vesion 查看当前conda版本
  8. conda search --full --name tensorflow 查看当前可使用的tensorflow版本
  9. pip install tensorflow-gpu==2.1 ,可指定GPU版本

配置步骤

亲测cuda10.1,cudnn,tensorflow2.1.0,gpu版本正确配置方法:

  1. 更新NVIDIA驱动至430.19或更高版本
  2. 安装anaconda3.5.3.0,安装时勾选创建环境变量
  3. 进入anaconda命令行
  4. 创建环境:conda create --name tf21py37 python=3.7,此为创建指定python3.7版本的环境
  5. 激活环境:conda activate tf21py37
  6. 安装cuda,cudnn,cv2:conda install cudatoolkit=10.1,cudnn:conda install cudnn=7.6 ;pip install opencv-python
  7. 安装tensorflow:pip install -i https://mirrors.aliyun.com/pypi/simple/ tensorflow-gpu== 2.1

安装过程中出现的问题及解决

问题1:ERROR: Cannot uninstall ‘wrapt’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
解决1:pip install wrapt --ignore-installed

问题2 :安装进度缓慢
解决2:上网搜索anaconda添加镜像源,添加阿里云,豆瓣等
更新-----------------
添加镜像:
阿里云
中国科技大学
豆瓣(douban)
清华大学
中国科学技术大学
conda config --add channels https://mirrors.aliyun.com/pypi/simple/
conda config --add channels http://pypi.mirrors.ustc.edu.cn/simple/
conda config --add channels https://pypi.mirrors.ustc.edu.cn/simple/
conda config --add channels http://pypi.douban.com/simple/
conda config --add channels https://pypi.tuna.tsinghua.edu.cn/simple/
查看添加的镜像:
conda config --get channels

测试

进入环境并运行测试

cpu_test

import tensorflow as tf
from tensorflow.python.client import device_lib
print(tf.__version__)  # 输出tf版本号
A_test = tf.constant([[1, 2], [3, 4]])
B_test = tf.constant([[5, 6], [7, 8]])
C_test = tf.matmul(A_test, B_test)
print(C_test)

输出为
tf.Tensor([[19 22] [43 50]], shape=(2, 2), dtype=int32)

gpu_test

import tensorflow as tf
from tensorflow.python.client import device_lib
print(tf.__version__)  # 输出tf版本号
gpu_device_name = tf.test.gpu_device_name()
print(gpu_device_name)
print(tf.test.is_gpu_available(), tf.config.list_physical_devices('GPU'))

输出中包含True,则GPU版本安装成功

参考文章https://blog.csdn.net/weixin_45709671/article/details/107448136

win10,GTX1650配置cuda10.1,cudnn7.6.5,cv2环境参考相关推荐

  1. Windows10配置CUDA10.0+cudnn7.5.1

    1.安装CUDA10.0 (1)下载:https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Windows&tar ...

  2. NVIDIA GeForce GTX 850M win10 cuda配置及安装教程

    NVIDIA GeForce GTX 850M win10 cuda配置 cuda10.0+cudnn7.6.4+tensorflow2.0.0+keras2.3.0 ---------------- ...

  3. 笔记本GTX1650配置tensorflow-gpu2.2.0(利用anaconda命令安装cuda和cudnn)

    笔记本WIN10+GTX1650配置tensorflow-gpu2.2.0(利用anaconda命令安装cuda和cudnn 概览 硬件配置:i7-10750h+4G GTX1650 软件配置:ana ...

  4. ubuntu18.04+cuda10.2+cudnn7.6.5+anaconda3+pytorch1.6

    ubuntu(18.04)配置pytorch(cuda10.2+cudnn7.6.5)环境 安装流程: 1安装显卡驱动 2安装CUDA 3安装CUDNN 4安装Anaconda3 5确定python版 ...

  5. Win10 + GTX1650显卡 安装 Cuda-10.1 + CuDNN-7.6 + Tensorflow-gpu-1.15.0 一步到位

    之前一直使用tensorflow的cpu版本,即便是简单的模型训练增加迭代次数到50次还是有点慢的,所以用gpu版本加速 废话不多说,流程先列出来,有个大致认识: anaconda----Visual ...

  6. win10 64bit+ qt5.12.0 + msvc2017 + libtorch(pytorch)+cuda10.1+cudnn7.6配置

    win10 64bit+ qt5.12.0 + msvc2017 + libtorch(pytorch)+cuda10.1+cudnn7.6配置 因为配置过程遇到了各种坑,资料又很少,记录下来,相信其 ...

  7. Ubuntu18.04+GTX1060(1660)+cuda10.1+cudnn7.6.5+pytorch1.7.1配置

    为了跑YOLOv5配置环境走了很多弯路,现在将详细不走记录下来,供以后参考. 一.显卡驱动安装 参考了这位大佬的文章:[Python学习]Ubuntu18.04从零开始安装CUDA与cuDNN_Yir ...

  8. ubuntu16.04+gtx1080ti+cuda10.0+cudnn7.4.2/cudnn7.6.4 环境配置

    配置:ubuntu16.04+gtx1080ti+cuda10.0+cudnn7.4.2/cudnn7.6.4+显卡驱动NVIDIA-Linux-x86_64-410.78 tensorflow1.1 ...

  9. win10双系统安装ubuntu16.04+gtx750ti+python3.6配置cuda-9.0+cuDNN7.05+TensorFlow-gpu1.8.0+opencv 2.4.13的过程汇总

    参考: https://blog.csdn.net/weixin_40494464/article/details/81010256 http://www.cnblogs.com/EasonJim/p ...

最新文章

  1. 没事做做题之棋盘上的距离
  2. 关于Qt Designer程序/UI文件打开未响应的解决方法
  3. Oracle 环境下 GoldenGate 集成抽取(Integrated Capture)模式与传统抽取模式(Classic Capture)间的切换...
  4. 纲:散户炒股存两大弱势 我自己不炒也不建议小散炒
  5. Postman全局变量的使用
  6. [云炬创业管理笔记]第九章为创业成败而准备测试2
  7. 中反应器体积_实验室规模半连续和连续生物反应器在微生物学和生物技术工艺中的作用...
  8. labelme2coco问题:TypeError: Object of type 'int64' is not JSON serializable
  9. 机器学习接口和代码之 线性回归
  10. 量子物理 詹班 计算机,(电气系计算机系詹班)量子物理作业答案
  11. 8个超好用的Python内置函数,提升效率必备
  12. react 使用rewired_create-react-app 通过 react-app-rewired 添加 webpack 的 alias
  13. Keepalived 无法自动转换主备角色,请关注 iptables 防火墙配置
  14. el-menu实现路由跳转及当前页的导航
  15. 【.Net MF网络开发板研究-06】以太网转串口
  16. 烧结钕铁硼的居里温度与工作温度
  17. 投影技术的分类与应用
  18. 文档服务器拓扑图,服务器网络结构拓扑图
  19. Kernel中bluetooth相关的config选项
  20. 蓝牙定位听说过的你,知道蓝牙定位信标的存在吗-新导智能

热门文章

  1. Chainlink 预言机新技术研发成果 - CCIP,DECO,FSS 和 OCR 2.0
  2. 如何关闭移动硬盘的自动休眠功能
  3. Redis单线程和多线程
  4. 国外打工人分享如何如何通过销售excel电子表格赚到 28 万美元
  5. ebp/栈帧/call stack
  6. 深入理解Spring----PostConstruct和PreDestroy
  7. Context-Aware Zero-Shot Recognition 论文翻译
  8. 青梅竹马醉酒后背杀!他差点被……?!
  9. 广州银行冲刺A股上市:不良贷款规模突破100亿元,不良率飙升
  10. 亿道丨三防手机丨手持终端丨PDA丨优势与特点