以前都是用notebook連接服務器使用tensorflow的,今天想在pycharm用試試,參考這里在臺式機上安裝一個。
首先我已經安裝過anaconda,所以就直接利用anaconda安裝tensorlfow,anaconda直接下載安裝即可:https://www.continuum.io/downloads
接下來正式開始:
- 換上安裝鏡像:
在cmd里面輸入
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --set show_channel_urls yes
這樣就后面的下載就快多了。
2.看看有哪些tensorlfow版本可以下載:
anaconda search -t conda tensorflow | findstr "win"
我看到的版本有:
Using Anaconda API: https://api.anaconda.org anaconda/tensorflow | 1.1.0 | conda | linux-ppc64le, linux-64, osx-64, win-64 anaconda/tensorflow-gpu | 1.1.0 | conda | linux-ppc64le, linux-64, win-64 conda-forge/r-tensorflow | 0.7 | conda | linux-64, osx-64, win-64 conda-forge/tensorflow | 1.2.0 | conda | linux-64, win-64, osx-64 dhirschfeld/tensorflow | 1.2.0 | conda | win-64 nehaljwani/tensorflow | 1.1.0 | conda | win-64, osx-64 nehaljwani/tensorflow-gpu | 1.1.0 | conda | win-64
3.支持window的最新版本是1.2.0的,我們可以選擇一個下載:
anaconda show conda-forge/tensorflow
anaconda 會給出下載提示:
Using Anaconda API: https://api.anaconda.org
Name: tensorflow
Summary: TensorFlow helps the tensors flow
Access: public
Package Types: conda
Versions:
- 0.7.1
- 0.8.0
- 0.9.0
- 0.10.0
- 0.11.0rc0
- 0.11.0rc2
- 0.11.0
- 0.12.1
- 1.0.0
- 1.1.0
- 1.2.0
To install this package with conda run:
conda install --channel https://conda.anaconda.org/conda-forge tensorflow
4.最后就按照提示安裝:
conda install --channel https://conda.anaconda.org/conda-forge tensorflow