当前位置:首页 > 操作系统 > Windows

Windows10+Python3.6+tensorflow11.1环境配置

Windows10+Python3.6+tensorflow11.1环境配置

这里通过Anaconda来安装;

注意,所有的路径不要包含空格和中文


1.安装anaconda,官网下载对应版本,建议安装最新版本的,安装到d盘,两个都勾选


Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片

**

2.安装一下Conda,不建议安装最高版本,我这里安装的是Conda9.0

**
Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片
历史版本下载地方
https://developer.nvidia.com/cuda-90-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal

默认安装路径
Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片
Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片
直接下一步
Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片
下一步
Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片
安装位置默认就好,最好默认
然后就是漫长的等待

Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片
验证CUDA安装是否成功:
打开命令提示符,输入:nvcc -V
出现如下类似信息:

Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片

查看环境变量
此电脑->右键->属性->高级系统设置->高级->环境变量
Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片
查看自己的默认就是好的!!!
Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片

**

3. 安装cudnn对应cuda的版本

**
Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片
覆盖到这个目录下
Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片

4. 在anaconda下查看有哪些python环境,并配置tensorflow

检测目前安装了哪些环境:conda info --envs
Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片
检查目前有哪些版本的python可以安装:conda search --full-name python

Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片

安装python 3.6.2版本:conda create --name tfenv python=3.6.2

Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片

现在显示让activate tfenv,按提示输入activate tfenv
tfenv是环境的环境改名字
conda remove -n tensorflow(这是环境的名字) --all
conda create --name tfenv(创建叫这个名字的环境) python=3.6.2
按照提示激活环境conda activate tfenv
安装tensorflow,注意这里可以选择版本

安装不成功可以换个源

pip install tensorflow-gpu==1.11.0-i https://pypi.mirrors.ustc.edu.cn/simple/

Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片
Windows10+Python3.6+tensorflow11.1环境配置 - 文章图片
镜像站推荐:
阿里云 http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

豆瓣(douban) http://pypi.douban.com/simple/

清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/

中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

5.安装pycharm,然后把刚才配置好的环境添加进去即可

转载请注明地址


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐