一、安裝anaconda
使用anaconda虛擬環境,不要傻傻的安裝python環境變量
使用python3而不要使用python2
二、安裝pycharm
配置使用anaconda的虛擬環境即可,不要用pycharm自己創建的
參考鏈接:https://blog.csdn.net/baoxiao7872/article/details/80328224
結果:
三、更換鏡像源
更換conda和pip鏡像源:https://blog.csdn.net/Sagepyt/article/details/100740862
更換pip源
# Windows環境
在C:\user\username\pip\pip.ini(自行創建)中加入:
[global]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn
disable-pip-version-check = true
timeout = 6000
# Linux環境
cd ~/
mkdir .pip
cd .pip
sudo vim pip.conf
# 加入如下內容(其實就是指定tuna源)
[global]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn
disable-pip-version-check = true
timeout = 6000
四、安裝TensorFlow使用穩定版本1.13.1而不要用2.0
五、安裝TensorFlow GPU版本不要用CPU版本
pip install tensorflow-gpu==1.2.1
conda install tensorflow==1.13.1
MAC OS平臺通過anaconda搭建tensorflow環境(Python 3.6版本)
https://blog.csdn.net/karmacode/article/details/79602800