筆記 - 安裝Swift, TensorFlow, Python, Anaconda
以下純屬自己翻網頁查資料用的紀錄
2019/0720
安裝Python有3個方式:
1. Visit Anaconda & find individual Edition (正常一般人使用的版本),你會看到下面的畫面,挑選妳的OS版本,下載與安裝即可(2020/06/29 update)
2. seupt Visual Studio Community 2017 from microsoft,安裝過程可以選擇Python (目前看到最新版本是3.6) & Anacnoda
上面這兩種安裝方法,安裝後,都會在程式集內找到"Anacanda",執行後,會出現下面的畫面,筆者是使用Spyder當作Python的編輯器
3. Install flow follow https://www.tensorflow.org/install download Python3, and install finish, Python 3.7
用 "Visual Studio Community 2017" install 的python有含Anaconda, 且內含spyder,可以當成python的編輯器與執行視窗
4. Reference
https://www.tensorflow.org/install <- here has original information form TensorFlow website
https://andy02172001.blogspot.com/2017/07/tensorflowwindowsanacondatensorflow.html <- Anaconda <- 似乎是2017開始大家使用的package install套件
https://medium.com/datainpoint/tf101-quick-start-a15ed882ccf <- 利用google Drive免安裝學習TensorFlow
https://rreadmorebooks.blogspot.com/2017/04/win10tensorflowgpu.html <- Tensorflow install教學
安裝TensorFlow後的測試
1. 測試從windows安裝的 Python 3.6,是否含TensorFlow -> fail, 用pip install並不會整合進去Anaconda內
根據TensorFlow的教學,我們在Spyder (內建於Anacoa,Microsoft Visual Studio Community安裝)中建立一個檔案,輸入以下程式碼並執行:
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
可以發現如圖片中之結果,"Error",天啊,有得搞囉
2. 因為已經事先下載了 "tensorflow_gpu-1.14.0-cp36-cp36m-win_amd64.whl",但是似乎無法安裝@@
D:\Users\ASUS\Documents\TensorFlow 的目錄
2019/07/20 下午 08:06 <DIR> .
2019/07/20 下午 08:06 <DIR> ..
2019/07/20 下午 01:59 26,680,368 python-3.7.4-amd64.exe
2019/07/20 下午 08:06 1,324,608 python-3.7.4-webinstall.exe
2019/07/14 下午 08:51 287,710,257 tensorflow_gpu-1.14.0-cp36-cp36m-win_amd64.whl
3 個檔案 315,715,233 位元組
2 個目錄 988,898,349,056 位元組可用
D:\Users\ASUS\Documents\TensorFlow>pip install --ignore-installed --upgrade tensorflow_gpu-1.14.0-cp36-cp36m-win_amd64.whl
tensorflow_gpu-1.14.0-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
You are using pip version 19.0.3, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
D:\Users\ASUS\Documents\TensorFlow>
D:\Users\ASUS\Documents\TensorFlow>python -m pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB)
100% |████████████████████████████████| 1.4MB 644kB/s
Installing collected packages: pip
Found existing installation: pip 19.0.3
Uninstalling pip-19.0.3:
Successfully uninstalled pip-19.0.3
Successfully installed pip-19.1.1
留言列表