The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Mac Rating: 7,3/10 3591 votes

These instructions were inspired by Mistobaan's gist, ageitgey's gist, and mattiasarro's tutorial, and Philster's gist

  1. The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Mac Free
  2. The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Mac Software
  3. The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Mac And Paste
  4. The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Mac Download
  5. The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Mac And Cheese
  6. The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Mac 2016
  7. The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Machine

This will compile TF itself, and also output a script to generate a Python package. Be warned, this will take a while! Well over an hour, probably more like two. I didn’t time it exactly. On some platforms you need to add -copt=-mfpmath=both to the set of flags above, but recent versions of clang provided with macOS don’t need this, and will barf if you do. You can run the app on the iPhone Simulator or on a device. On the simulator you may again get messages such as “The TensorFlow library wasn’t compiled to use SSE4.1 instructions”, but you shouldn’t get these on the device. Just for testing purposes, the app will make two predictions: once for a male example and once for a female example.

Background

I always encountered the following warnings when running my scripts using the precompiled TensorFlow Python package:

Dec 11, 2012  Open a new window in the Finder and select Go menu - Home to go to your home folder. Then proceed to look in Library/Application Support/Microsoft/User Templates/My Templates. So altho hard drive has a library, it doesn't have the path listed above. Application support library mac. Jan 12, 2020  Launch Terminal, located in /Applications/Utilities. Enter the following command at the Terminal prompt: Press Return. Once the command executes, you can quit Terminal. The Library folder will now be visible in the Finder. Should you ever wish to set the Library folder. Access Hidden Library Menu Option On Mac. Follow the steps below to access the Hidden Library Menu option on your Mac. Left-click your mouse anywhere on the screen of your Mac. This will reveal the Go Option in the top menu bar of your Mac. You can also click on the Finder Icon in the Dock of your Mac to activate the Go Option.

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

The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Mac Free

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.

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.

  • 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 a ModuleNotFoundError: No module named 'numpy.lib.mixins' error later on during bazel build
    • wheel
  • Clone the TensorFlow repository (instructions): be sure to checkout the r1.9.0 release
  • Configure the installationMy configure settings (Enter N for CUDA support if you do not want CUDA support or do not have a NVIDIA GPU):
  • Comment out linkopts = ['-lgomp'], (line 112) in tensorflow/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:

Have fun training your models!

These instructions were inspired by Mistobaan's gist, ageitgey's gist, and mattiasarro's tutorial.

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

The Tensorflow Library Wasn
  • Model: MacBook Pro (Retina, 15-inch, Mid 2014)
  • Processor: 2.5 GHz Intel Core i7
  • Memory: 16 GB 1600 MHz DDR3
  • Graphics: Intel Iris Pro 1536 MB RAM + NVIDIA GeForce GT 750M 2048 MB RAM

Software

  • OS: macOS Sierra 10.12.6
  • TensorFlow version: 1.3.1
  • Python version: 3.6.2 (conda)
  • Bazel version: 0.6.0-homebrew
  • CUDA/cuDNN version: 8.0/6.0

The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Mac Software

Prerequisites

macOS Sierra (10.12)

The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Mac And Paste

I tested on macOS Sierra 10.12. 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 8.2.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

The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Mac Download

The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Mac And Cheese

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.

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.

Jan 16, 2020  Go to the General tab and select iCloud Music Library to turn it on. If you don't subscribe to Apple Music or iTunes Match, you won’t see an option to turn on iCloud Music Library. If you have a large music library, it might take some time to upload. Dec 11, 2017  The problem of exporting music from iPod to iTunes bothers you for a long time. Now it’s time to ease off. Step-by-step tutorial is here to teach you how to. Mar 02, 2019  iPod is warmly welcome by music fans for its portability and capacity which holds thousands of songs at a time. If you are new to iPod, then you may need to build a new playlist first according to your own preference, and it is essential to know how to transfer music from iTunes to iPod especially when you want to make good used of this gorgeous device. Mar 17, 2020  Keep reading the rest part to get a practical method about how to move music from iPod to iTunes in minutes. Tool to Transfer iPod Music to iTunes Library on Computer. You know, iTunes just offers you a way to sync music from iTunes or computer to iPod or other iDevice, and it won’t sync songs from iPod back to iTunes on your computer. How to transfer music from ipod to mac itunes library.

The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Mac 2016

  • 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 a ModuleNotFoundError: No module named 'numpy.lib.mixins' error later on during bazel build
    • wheel
  • Install CUDA support prerequisites
    • Install GNU coreutils and swig
    • Refer to this for more detailed CUDA installation instructions.
    • Install CUDA Toolkit 8.0
    • Install cudNN 6.0
    • Set environment variable DYLD_LIBRARY_PATH
  • Clone the TensorFlow repository (instructions): be sure to checkout the r1.3 release
  • Configure the installationMy configure settings (Enter N for CUDA support if you do not want CUDA support or do not have a NVIDIA GPU):
  • Comment out linkopts = ['-lgomp'], (line 112) in tensorflow/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:

The Tensorflow Library Wasn't Compiled To Use Sse4.1 Instructions Machine

Have fun training your models!