민서네집

Mac에서 tensorflow 설치기 본문

머신러닝

Mac에서 tensorflow 설치기

브라이언7 2016. 5. 15. 20:10


설치한 장비 스펙

  1. MacBook Pro (13-inch, Early 2011)
  2. OS X El Capitan v10.11.4

작년 이사 후부터 창고에 있던 오래된 맥북프로 노트북을 꺼내서 운영체제와 각종 프로그램을 업데이트 한 후에 설치해봤습니다.

OSError: [Errno 1] Operation not permitted: '/tmp/pip-niRwFD-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy-1.8.0rc1-py2.7.egg-info'

이런 에러에 발목을 잡혀 이것저것 해보다가 방금 간신히 Hello World를 Tensorflow로 찍어봤습니다.

저는 이상하게도

$ sudo -H pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py2-none-any.whl

이렇게 할 때 위 메시지처럼 numpy 에러가 나는데,

$ sudo easy_install -U numpy $ sudo easy_install -U setuptools

이렇게 따로 업그래이드를 해 준 후에 tensorflow를 설치하니, 잘 되었습니다.


$ sudo easy_install -U numpy

할 때, 무수히 많은 오류가 출력되었지만, 아후에 tensorflow는 잘 설치가 되었고, 작동도 잘 되었다.


[참고글] http://migom.tistory.com/16

[참고]

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#installation-for-mac-os-x


Dependencies

Follow instructions here to install the dependencies for bazel. You can then use homebrew to install bazel and SWIG:

$ brew install bazel swig

You can install the python dependencies using easy_install or pip. Using easy_install, run

$ sudo easy_install -U six
$ sudo easy_install -U numpy
$ sudo easy_install wheel

We also recommend the ipython enhanced python shell, which you can install as follows:

$ sudo easy_install ipython

Run a TensorFlow demo model

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/g3doc/get_started/os_setup.md#test-the-tensorflow-installation


# Using 'python -m' to find the program in the python search path:
$ python -m tensorflow.models.image.mnist.convolutional


내 Macbook Pro 노트북으로 64분이 걸렸다.


Train your first TensorFlow neural net model

http://migom.tistory.com/16



Comments