![For For](/uploads/1/2/6/6/126622633/934563767.png)
- Tensorflow Version For El Capitan Os
- Tensorflow Version For El Capitan Mac
- Tensorflow Version For El Capitan 2
- Tensorflow Version For El Capitan 10
- Tensorflow El Capitan
Build tensorflow on OSX with NVIDIA CUDA support (GPU acceleration) These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR. Requirements OS X 10.10 (Yosemite) or newer. I tested these intructions on OS X v10.10.5. They will probably work on OS X v10.11 (El Capitan), too. The TensorFlow Docker images are already configured to run TensorFlow. A Docker container runs in a virtual environment and is the easiest way to set up GPU support. Docker pull tensorflow/tensorflow:latest-py3 # Download latest stable image docker run -it -p 8888:8888 tensorflow/tensorflow:latest-py3-jupyter # Start Jupyter server.
These instructions were inspired by Mistobaan's gist, ageitgey's gist, and mattiasarro's tutorial, and Philster's gist
Background
I always encountered the following warnings when running my scripts using the precompiled TensorFlow Python package:
I realized I can make these warnings go away by compiling from source, in addition to improve training speed. It was not as easy and straightforward as I thought, but I finally succeeded in creating a working build. Here I outline the steps I took, in the hopes it may benefit those who have encountered similar challenges.
Machine setup
Hardware
- Model: MacBook Pro (Retina, 15-inch, Mid 2015)
- Processor: 2.5 GHz Intel Core i7
- Memory: 16 GB 1600 MHz DDR3
- Graphics: Intel Iris Pro 1536 MB RAM
Software
- OS: macOS Sierra 10.13.6
- TensorFlow version: 1.9.0
- Python version: 3.6.2 (conda)
- Bazel version: 0.15.2-homebrew
Prerequisites
macOS Sierra (10.13)
I tested on macOS High Sierra 10.13. It may also work on Yosemite (10.10) and El Capitan (10.11), but I have not verified.
Xcode Command-Line Tools
I successfully compiled using Xcode 9.4.1 (Refer to http://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#system-requirements).
Disable SIP (System Integrity Protection) on Mac (I didn't encounter such error but I leave it be in case you have similar issue.)
For some reason I had to disable SIP in order for
bazel build
to build the TensorFlow pip package successfully. For security reasons, remember to re-enable SIP after your build.Tensorflow Version For El Capitan Os
Steps
Note: Many steps were based on https://www.tensorflow.org/install/install_sources ; I just happened to have a slightly different order that worked out for me.
Tensorflow Version For El Capitan Mac
- Install homebrew
- Install bazel
- Install conda (I wanted a Python environment that will not mess with system Python. I downloaded Miniconda for Python 2.7 and intended to create a Python 3.6 environment)
- Create and activate Python 3.6 environmentAlternatively, you can do:
- Verify that the following packages are installed:
six
numpy
- has to be at least
1.13
so you don't get aModuleNotFoundError: No module named 'numpy.lib.mixins'
error later on duringbazel build
wheel
- Clone the TensorFlow repository (instructions): be sure to checkout the
r1.9.0
release - Configure the installationMy
configure
settings (EnterN
for CUDA support if you do not want CUDA support or do not have a NVIDIA GPU): - Comment out
linkopts = ['-lgomp'],
(line 112) intensorflow/third_party/gpus/cuda/BUILD.tpl
(Refer to https://medium.com/@mattias.arro/installing-tensorflow-1-2-from-sources-with-gpu-support-on-macos-4f2c5cab8186) - Build the pip package (reference: https://stackoverflow.com/questions/41293077/how-to-compile-tensorflow-with-sse4-2-and-avx-instructions). It took around 35 minutes on my MacBook Pro.
- Refer to https://github.com/tensorflow/tensorflow/issues/6729 if you run into any other problems
- Build the wheel (.whl) file
- Install the pip package
- Validate your installation (instructions)
- Change directory to any directory on your system other than the
tensorflow
subdirectory from which you ran./configure
- Invoke python interactive shell
- Type in the following scriptIf you have a supported NVIDIA CUDA GPU, the script should run without a problem and display something similar to this:
- Change directory to any directory on your system other than the
Have fun training your models!
Is your Mac up to date with the latest version of the Mac operating system (macOS or OS X)? Is it using the version required by some product or feature? Which versions are earlier (older) or later (newer, more recent) than the version currently installed? To find out, learn which version is installed now.
If your macOS isn't up to date, you may be able to update to a later version.
Which macOS version is installed?
From the Apple menu in the corner of your screen, choose About This Mac. You'll see the macOS name, such as macOS Mojave, followed by its version number. If some product or feature requires you to know the build number as well, click the version number to see it.
This example shows macOS Catalina version 10.15 build 19A583.
Which macOS version is the latest?
These are all Mac operating systems, starting with the most recent. When a major new macOS is released, it gets a new name, such as macOS Catalina. And as updates that change the macOS version number become available, this article is updated to show the latest version of that macOS.
If your Mac is using an earlier version of any Mac operating system, you should install the latest Apple software updates, which can include important security updates and updates for the apps installed by macOS, such as Safari, Books, Messages, Mail, Music, Calendar, and Photos.
Tensorflow Version For El Capitan 2
macOS | Latest version |
---|---|
macOS Catalina | 10.15.5 |
macOS Mojave | 10.14.6 |
macOS High Sierra | 10.13.6 |
macOS Sierra | 10.12.6 |
OS X El Capitan | 10.11.6 |
OS X Yosemite | 10.10.5 |
OS X Mavericks | 10.9.5 |
OS X Mountain Lion | 10.8.5 |
OS X Lion | 10.7.5 |
Mac OS X Snow Leopard | 10.6.8 |
Mac OS X Leopard | 10.5.8 |
Mac OS X Tiger | 10.4.11 |
Mac OS X Panther | 10.3.9 |
Mac OS X Jaguar | 10.2.8 |
Mac OS X Puma | 10.1.5 |
Mac OS X Cheetah | 10.0.4 |
Tensorflow Version For El Capitan 10
Learn more
Tensorflow El Capitan
- Always use the macOS that came with your Mac, or a compatible newer version.
- Learn how to reinstall macOS from macOS Recovery.