参考:

 
代码获取:
 
一、为 macOS 准备环境
在构建 TensorFlow 之前,您必须在自己的系统中安装以下内容:
1. bazel:Bazel是google推出的一款工程编译工具,并且已经将其开源

2. TensorFlow Python 依赖项。

3. (可选)支持 GPU 的 TensorFlow 所需的 NVIDIA 软件包。

 
二、安装HomeBrew
 
安装完成后,修改~/.bash_profile,把brew的路径放置到路径前面。
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
 
三、安装Bazel
$ brew install bazel
Once installed, you can upgrade to a newer version of Bazel using the following command:
$ brew upgrade bazel
 
四、安装Python 2
$ brew install python@2
 
修改~/.bash_profile,添加以下内容:
export PATH="/usr/local/opt/python@2/libexec/bin:$PATH"
 
五、安装 Python 依赖项
要构建 TensorFlow,您必须安装以下软件包:
1. six:一个专门用来兼容 Python 2 和 Python 3 的库

2. numpy:TensorFlow 需要的数值处理软件包。

3、wheel:用于管理 wheel (.whl) 格式的 Python 压缩包。

4、mock:Python中一个用于支持的测试的库
5、enum34:枚举模块
6、keras:一个用 Python 编写的高级神经网络 API
 
调用以下命令:
$ sudo pip2 install six numpy wheel mock enum34 keras
 
 

 

 

相关文章:

  • 2021-07-30
  • 2021-12-30
  • 2022-01-16
  • 2022-03-11
  • 2021-04-17
  • 2021-06-09
  • 2021-05-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2021-09-05
  • 2022-12-23
相关资源
相似解决方案