2017年3月1日 星期三

Tensorflow Windows版本安裝教學(免虛擬機)


Tensorflow 終於推出Windows版本啦!!

今天就在這裡發個安裝教學吧!!
順便附上官方原文:https://www.python.org/downloads/release/python-352/
※目前只支援Win7,Win10,且只支援64bit的作業系統

Step.1:需要安裝python 3.5.2 以上版本

*如果已經安裝python的話,可以直接跳到Step.2


  1. 首先到這裡下載python的安裝檔:https://www.python.org/downloads/release/python-352/
    *可以下載executable installer會比較方便

  2. 開啟安裝介面
    Add to Path可以先打勾,安裝完的話就會自動添加python到環境變數
    *如果沒打勾的話安裝完請再到環境變數設定路徑

  3. 安裝完點擊Close關閉



  4. 確認安裝
    可以開啟命令提示字元輸入"python",如果可以進入python和出現版本訊息,代表安裝成功




Step2.使用pip安裝tensorflow

pip工具是安裝python時會自動安裝的,不須另外下載


  1. 進入命令提示字元輸入"pip --version"或"pip -V",可以查看pip版本

  2. 要安裝tensorflow需要pip  9.0.1 以上的版本,輸入"pip install --upgrade pip" 即可更新pip

  3. 更新完以後輸入"pip install --upgrade tensorflow"來安裝tensorflow
    如果想安裝GPU版的朋友請輸入"pip install --upgrade tensorflow-gpu"即可安裝GPU版

  4. 安裝結束
    *我因為沒更新pip就先安裝tensorflow才會出現下面的黃字,如果安裝成功應該會出現「Successfully installed tensorflow-1.0.0」的訊息

Step.3 測試tensorflow

  1. 進入python (於命令提示字元中輸入python) ,並輸入以下程式碼

    import tensorflow as tf                   
    hello = tf.constant('Hello, TensorFlow!') 
    sess = tf.Session()                       
    print(sess.run(hello))                    


  2. 如果有出現「Hello, TensorFlow!」,就代表tensorflow能夠正確執行啦!!

安裝教學到此結束,謝謝觀看!!








11 則留言:

  1. Great post! I am see the great contents and step by step read really nice information.I am gather this concepts and more information. It's helpful for me my friend. Also great blog here with all of the valuable information you have. Python Training in Chennai

    回覆刪除
  2. 如果我在輸入 pip install --upgrade tensorflow

    出現一些Eeeor,似乎說某資料夾的目錄不是空的。 我該如何解決呢?

    回覆刪除
  3. 我在輸入pip install --upgrade pip之後, 總是出現目標電腦拒絕連線, 而且最後一行還顯示Requirement already up-to-date..... 但我的pip明明是8.1.1 請問大大有解嗎?

    回覆刪除
  4. This is very good content you share on this blog. it's very informative and provide me future related information.
    online Python certification course | python training in OMR | Python training course in Chennai

    回覆刪除
  5. It’s great to come across a blog every once in a while that isn’t the same out of date rehashed material. Fantastic read.
    Data science Course Training in Chennai |Best Data Science Training Institute in Chennai
    RPA Course Training in Chennai |Best RPA Training Institute in Chennai
    AWS Course Training in Chennai |Best AWS Training Institute in Chennai
    Devops Course Training in Chennai |Best Devops Training Institute in Chennai
    Selenium Course Training in Chennai |Best Selenium Training Institute in Chennai
    Java Course Training in Chennai | Best Java Training Institute in Chennai

    回覆刪除
  6. I would really like to read some personal experiences like the way, you've explained through the above article. I'm glad for your achievements and would probably like to see much more in the near future. Thanks for share.Keep sharing!!

    android training in chennai

    android online training in chennai

    android training in bangalore

    android training in hyderabad

    android Training in coimbatore

    android training

    android online training



    回覆刪除