win10,GTX1650配置cuda10.1,cudnn7.6.5,cv2环境参考
常用命令
- conda env list 当前已创建的环境列表
- conda create -n name 创建名称为name的环境
- conda remove -n name --all 删除名称为name的环境
- conda activate name 进入名为name的环境
- conda install cudatoolkit=10.1 在当前环境安装cuda10.1
- conda install cudnn=7.6 在当前环境安装cudnn7.6
- conda --vesion 查看当前conda版本
- conda search --full --name tensorflow 查看当前可使用的tensorflow版本
- pip install tensorflow-gpu==2.1 ,可指定GPU版本
配置步骤
亲测cuda10.1,cudnn,tensorflow2.1.0,gpu版本正确配置方法:
- 更新NVIDIA驱动至430.19或更高版本
- 安装anaconda3.5.3.0,安装时勾选创建环境变量
- 进入anaconda命令行
- 创建环境:conda create --name tf21py37 python=3.7,此为创建指定python3.7版本的环境
- 激活环境:conda activate tf21py37
- 安装cuda,cudnn,cv2:conda install cudatoolkit=10.1,cudnn:conda install cudnn=7.6 ;pip install opencv-python
- 安装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环境参考相关推荐
- Windows10配置CUDA10.0+cudnn7.5.1
1.安装CUDA10.0 (1)下载:https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Windows&tar ...
- NVIDIA GeForce GTX 850M win10 cuda配置及安装教程
NVIDIA GeForce GTX 850M win10 cuda配置 cuda10.0+cudnn7.6.4+tensorflow2.0.0+keras2.3.0 ---------------- ...
- 笔记本GTX1650配置tensorflow-gpu2.2.0(利用anaconda命令安装cuda和cudnn)
笔记本WIN10+GTX1650配置tensorflow-gpu2.2.0(利用anaconda命令安装cuda和cudnn 概览 硬件配置:i7-10750h+4G GTX1650 软件配置:ana ...
- 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版 ...
- Win10 + GTX1650显卡 安装 Cuda-10.1 + CuDNN-7.6 + Tensorflow-gpu-1.15.0 一步到位
之前一直使用tensorflow的cpu版本,即便是简单的模型训练增加迭代次数到50次还是有点慢的,所以用gpu版本加速 废话不多说,流程先列出来,有个大致认识: anaconda----Visual ...
- win10 64bit+ qt5.12.0 + msvc2017 + libtorch(pytorch)+cuda10.1+cudnn7.6配置
win10 64bit+ qt5.12.0 + msvc2017 + libtorch(pytorch)+cuda10.1+cudnn7.6配置 因为配置过程遇到了各种坑,资料又很少,记录下来,相信其 ...
- Ubuntu18.04+GTX1060(1660)+cuda10.1+cudnn7.6.5+pytorch1.7.1配置
为了跑YOLOv5配置环境走了很多弯路,现在将详细不走记录下来,供以后参考. 一.显卡驱动安装 参考了这位大佬的文章:[Python学习]Ubuntu18.04从零开始安装CUDA与cuDNN_Yir ...
- 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 ...
- 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 ...
最新文章
- 没事做做题之棋盘上的距离
- 关于Qt Designer程序/UI文件打开未响应的解决方法
- Oracle 环境下 GoldenGate 集成抽取(Integrated Capture)模式与传统抽取模式(Classic Capture)间的切换...
- 纲:散户炒股存两大弱势 我自己不炒也不建议小散炒
- Postman全局变量的使用
- [云炬创业管理笔记]第九章为创业成败而准备测试2
- 中反应器体积_实验室规模半连续和连续生物反应器在微生物学和生物技术工艺中的作用...
- labelme2coco问题:TypeError: Object of type 'int64' is not JSON serializable
- 机器学习接口和代码之 线性回归
- 量子物理 詹班 计算机,(电气系计算机系詹班)量子物理作业答案
- 8个超好用的Python内置函数,提升效率必备
- react 使用rewired_create-react-app 通过 react-app-rewired 添加 webpack 的 alias
- Keepalived 无法自动转换主备角色,请关注 iptables 防火墙配置
- el-menu实现路由跳转及当前页的导航
- 【.Net MF网络开发板研究-06】以太网转串口
- 烧结钕铁硼的居里温度与工作温度
- 投影技术的分类与应用
- 文档服务器拓扑图,服务器网络结构拓扑图
- Kernel中bluetooth相关的config选项
- 蓝牙定位听说过的你,知道蓝牙定位信标的存在吗-新导智能