如何安装tensorlflow

安装tensorflow有很多条件,麻烦的很。

我推荐用一中最好的法子,windows 和 linux 通吃。

神奇的就是用Anaconda.

在Windows安装TensorFlow的方法

1、第一步下载64位(python3.7)版本的Anaconda,并安装。

2、第二步

 选择 anaconda prompt, 输入命令:conda install tensorflow 会在默认的位置安装tensorflow(不会开辟新的虚拟环境,因此也用不到激活虚拟环境)

3、此外,是优秀的虚拟环境安装方法(会激活单独的一个虚拟空间,隔离安装)

Interested in trying out these TensorFlow packages? After installing Anaconda or Miniconda, create a new conda environment containing TensorFlow and activate it

conda create -n tensorflow_env tensorflow
conda activate tensorflow_env

Or for the GPU version

conda create -n tensorflow_gpuenv tensorflow-gpu
conda activate tensorflow_gpuenv

TensorFlow is now installed and ready for use. For those new to TensorFlow, the tutorials offer a great place to get started.

ubuntu的安装方法类似。安装完毕anaconda后,打开控制台,输入以上的隔离安装命令,就安装就行了。无论是 cup版本的tensorflow还是gpu版本的tensorflow,都是一路绿灯。

原文地址:https://www.cnblogs.com/qqhfeng/p/12128452.html