安装TensorFlow开发环境

  TensorFlowd的安装过程有很多,很全面但是结合自己的情况问题也是比较多,这里只是记录了自己安装过程,本人使用的是Anaconda3-2020.02-Windows-x86_64 进行的安装。

1.安装Anaconda3

  使用anaconda安装的原因是因为其集成了很多库,安装过程简单一路next就行(建议不要装到系统盘,资源占用严重),建议使用国内地址下载安装包(清华的开源软件镜像站)。

  安装完成后打开anaconda navigator 一目了然,这里装了什么环境什么库,库的版本是什么。现在界面什么做的很好了,好多大神还是用命令行,再次膜拜。

2 安装TensorFlow Cpu 

2.1命令安装参照:https://blog.csdn.net/zqxdsy/article/details/89646615#1%20%E5%AE%89%E8%A3%85Anaconda,但是请注意自己的python版本,我这里是3.7.

(base) C:\Users>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
Warning: 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/' already in 'channels' list, moving to the top

(base) C:\Users>conda config --set show_channel_urls yes
(base) C:\Users>conda create -n tensorflow python=3.7
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.8.2
  latest version: 4.8.3

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: D:\anaconda\envs\tensorflow

  added / updated specs:
    - python=3.7


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    certifi-2020.4.5.1         |           py37_0         156 KB  defaults
    openssl-1.1.1g             |       he774522_0         4.8 MB  defaults
    python-3.7.7               |       h60c2a47_2        18.3 MB  defaults
    setuptools-46.1.3          |           py37_0         528 KB  defaults
    sqlite-3.31.1              |       h2a8f88b_1         1.3 MB  defaults
    zlib-1.2.11                |       h62dcd97_4         132 KB  defaults
    ------------------------------------------------------------
                                           Total:        25.2 MB

The following NEW packages will be INSTALLED:

  ca-certificates    pkgs/main/win-64::ca-certificates-2020.1.1-0
  certifi            pkgs/main/win-64::certifi-2020.4.5.1-py37_0
  openssl            pkgs/main/win-64::openssl-1.1.1g-he774522_0
  pip                pkgs/main/win-64::pip-20.0.2-py37_1
  python             pkgs/main/win-64::python-3.7.7-h60c2a47_2
  setuptools         pkgs/main/win-64::setuptools-46.1.3-py37_0
  sqlite             pkgs/main/win-64::sqlite-3.31.1-h2a8f88b_1
  vc                 pkgs/main/win-64::vc-14.1-h0510ff6_4
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.16.27012-hf0eaf9b_1
  wheel              pkgs/main/win-64::wheel-0.34.2-py37_0
  wincertstore       pkgs/main/win-64::wincertstore-0.2-py37_0
  zlib               pkgs/main/win-64::zlib-1.2.11-h62dcd97_4


Proceed ([y]/n)? y


Downloading and Extracting Packages
zlib-1.2.11          | 132 KB    | ############################################################################ | 100%
openssl-1.1.1g       | 4.8 MB    | ############################################################################ | 100%
certifi-2020.4.5.1   | 156 KB    | ############################################################################ | 100%
python-3.7.7         | 18.3 MB   | ############################################################################ | 100%
sqlite-3.31.1        | 1.3 MB    | ############################################################################ | 100%
setuptools-46.1.3    | 528 KB    | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate tensorflow
#
# To deactivate an active environment, use
#
#     $ conda deactivate


(base) ..>conda activate tensorflow

这里要执行以下安装 pip install --upgrade --ignore-installed tensorflow

直接ctrl + c 打断 查看这里要下载的文件名称,我这里是Downloading tensorflow-2.1.0-cp37-cp37m-win_amd64.whl (355.8 MB),去镜像网站下载对应的文件。

在当前的命令行下执行:pip install 我这里是

pip install D:\anaconda\envs\tensorflow\tensorflow-2.1.0-cp37-cp37m-win_amd64.whl

接着等待安装过程吧!!!!!!!

切到tesorflow打开vscode体验一下,出问题了

选一下环境就好了,ok了,注意指定,python解释器的位置,使用其他的工具也是选定解释器位置就好了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值