mac配置tensorflow

1 安装Homebrew

ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
最后显示,基本就没问题了

==> Next steps
Run `brew help` to get started
Further documentation: https://git.io/brew-docs
==> Homebrew has enabled anonymous aggregate user behaviour analytics
Read the analytics documentation (and how to opt-out) here:
  https://git.io/brew-analytics

2 安装wget,pip(为了python)

brew install wget
安装pip

wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py

3安装virtualenv

virtualenv是python的沙箱工具.我们毕竟是在自己机器上做实验,为了不来回修改各种环境变量,我们一般还是弄个沙箱完比较好.测试完直接删除就行,不用再去改各种配置文件.
用pip命令来安装:

sudo pip install --upgrade virtualenv

安装成功后,创建一个工作目录,我直接在home里创建了个文件夹.之后所有tensorFlow相关的配置都在这下面进行,同时对目录进行激活

virtualenv --system-site-packages ~/tensorflow
cd ~/tensorflow
source bin/activate 

之后所有的目录前面会带上tensorflow这个字符
这里写图片描述


http://www.tuicool.com/articles/Fni2Yr

http://www.cnblogs.com/zuike/p/4402022.html

http://python.jobbole.com/81312/

你可能感兴趣的:(tag-深度学习,mac,homeBrew,pip,tensorflow)