- 安装anaconda。选择最新的版本进行安装。
anaconda下载地址 - 在conda环境下搭建TensorFlow框架。
TensorFlow框架的cpu版本安装是比较简单的,但是直接下载会速度很慢。原因是TensorFlow的开源工具包是国外的,所以在国内下载比较慢。因此需要通过国内的镜像来加速下载。
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow # CPU版本 pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow-gpu # GPU版本
常用镜像
阿里云 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/
- 在新建的虚拟python环境下搭建TensorFlow框架。
可以重新创建一个虚拟环境,然后在该环境下搭建框架,这样可以避免框架和原有环境之间包的版本冲突。
创建新环境:
(1)创建新的环境,并同时安装好numpy
conda create -n tensorflow python=3.6 numpy pip
(2)输入:activate tensorflow ,进入环境
(3)进行安装tensorflow(按照上述步骤1)
(4)安装jupyter conda install jupyter



