MAC OS X10.10 Caffe no Brain installation (CPU only)

Source: Internet
Author: User
Tags install homebrew

On a whim, I want to play all kinds of deep learning hot tools (Caffe, Theano, etc.) in the spare time of the week before the internship, but the pain of installing and configuring the environment ... It took me two days to install Caffe, and I had a lot of circles around the documentation tutorials. Incomplete statistics, some of the useful references to me are as follows:

    1. Caffe Official Document:
    2. The original information:
    3. Various problems arise:!topic/caffe-users/G7gj03A-JPw, 2018,,
    4. By the way, OPENCV installation:
Well, the above a bunch of links not only want to spit groove, but also to you some can query reference. but, for those of me who are extremely cold on the installation configuration, I just need no brain installation-superficial understanding, only to be able to use. Therefore, this document is recorded so as to facilitate the fellow human beings. Another important reason is that a lot of information on the web is a bit outdated (including official documents) and only makes people (me) circle around.
Goal in the Mac OS X10.10 system successfully installed Caffe, because my Mac does not have Nvdia graphics card, so the use of CPU only installation method. (As long as you can run two experiments to play!) )
Key points Well, the main point of installation is only two:
    • There is no need to change the installation based on libstdc++ to compile and install ah ah ... (Official document This cheat paper)
    • Manually modify the place that makes it cpu_only (don't ask me why, anyway I succeeded)
Step by step below starts the no-nonsense warm hands-on installation process ...
1. Install Homebrew Click Homebrew Home:, install Homebrew and succeed.
2. Install Cuda to cuda official website:, download the latest Cuda 7.0, follow the installation instructions to go. After the installation is successful, set the associated path. Set the following environment variables in/etc/profile:

Export Path=/developer/nvidia/cuda-7.0/bin: $PATH

Export Dyld_library_path=/developer/nvidia/cuda-7.0/lib: $DYLD _library_path

3. Install a variety of dependencies here to say two more, due to the update of OS x10.9+ and Cuda 7.0, now they support the compilation of libc++, so the various work done in the previous data (modify the content of brew edit) is not necessary, directly installed.
For x in snappy leveldb gflags glog szip hdf5 lmdb homebrew/science/opencv;do    Brew uninstall $x;    Brew Install--FRESH-VD $x;d onebrew uninstall--force protobuf; Brew Install--with-python--fresh-vd protobufbrew uninstall boost Boost-python; Brew Install--FRESH-VD boost Boost-python

4. Download the Caffe and modify the configuration
git clone CAFFECP Makefile.config.example makefile.config
In Makefile.config: Uncomment the cpu_only: = 1
5. Installation
mkdir BUILDCD Buildcmake.

And you'll magically discover that the cpu_only line still says off ... So let's change him manually. Open the CMakeCache.txt and assign the cpu_only:bool= to on. Open Caffeconfig.cmake, locate set (Cpu_only, OFF), and change to on.
Started installing the
Make Allmake Runtest

It's done!

MAC OS X10.10 Caffe no Brain installation (CPU only)

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.