MacでTensorflow
Tensorflow
http://qiita.com/icoxfog417/items/fb5c24e35a849f8e2c5d
おもしろそう
インストール
https://www.tensorflow.org/versions/r0.9/get_started/os_setup.html#pip-installation をコピペしながら作業
easy_install
なんてあるの知らなくて戸惑った
<br /> sudo easy_install pip<br /> sudo easy_install --upgrade six<br />
を見逃してたので tensorflow-0.9.0-py2-none-any.whl is not a supported wheel on this platform.
と言われてしまった…
sudo pip install --upgrade $TF_BINARY_URL
<br /> $ sudo pip install --upgrade $TF_BINARY_URL</p> <p>...</p> <p>Exception:<br /> Traceback (most recent call last):<br /> File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main<br /> status = self.run(options, args)<br /> File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/commands/install.py", line 317, in run<br /> prefix=options.prefix_path,<br /> File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 736, in install<br /> requirement.uninstall(auto_confirm=True)<br /> File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 742, in uninstall<br /> paths_to_remove.remove(auto_confirm)<br /> File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove<br /> renames(path, new_path)<br /> File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/utils/__init__.py", line 267, in renames<br /> shutil.move(old, new)<br /> File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move<br /> copytree(src, real_dst, symlinks=True)<br /> File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree<br /> raise Error, errors<br /> Error: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', '/tmp/pip-Qy6Cic-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py', "[Errno 1] Operation not permitted: '/tmp/pip-Qy6Cic-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', '/tmp/pip-Qy6Cic-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc', "[Errno 1] Operation not permitted: '/tmp/pip-Qy6Cic-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', '/tmp/pip-Qy6Cic-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py', "[Errno 1] Operation not permitted: '/tmp/pip-Qy6Cic-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', '/tmp/pip-Qy6Cic-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc', "[Errno 1] Operation not permitted: '/tmp/pip-Qy6Cic-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib/markers.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', '/tmp/pip-Qy6Cic-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib', "[Errno 1] Operation not permitted: '/tmp/pip-Qy6Cic-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib'")]<br />
(#^ω^)
--ignore-installed six
https://github.com/tensorflow/tensorflow/issues/500
<br /> sudo pip install --upgrade $TF_BINARY_URL --ignore-installed six<br />
でうまくいった(幻想)
ふるい numpy
<br /> $ python<br /> Python 2.7.10 (default, Oct 23 2015, 19:19:21)<br /> [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin<br /> Type "help", "copyright", "credits" or "license" for more information.<br /> >>> import tensorflow<br /> RuntimeError: module compiled against API version 0xa but this version of numpy is 0x9<br /> Traceback (most recent call last):<br /> File "<stdin>", line 1, in <module><br /> File "/Library/Python/2.7/site-packages/tensorflow/__init__.py", line 23, in <module><br /> from tensorflow.python import *<br /> File "/Library/Python/2.7/site-packages/tensorflow/python/__init__.py", line 48, in <module><br /> from tensorflow.python import pywrap_tensorflow<br /> File "/Library/Python/2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module><br /> _pywrap_tensorflow = swig_import_helper()<br /> File "/Library/Python/2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper<br /> _mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)<br /> ImportError: numpy.core.multiarray failed to import<br />
(#^ω^)
Homebrew 先生
<br /> brew install python<br />
でできた!
Posted on: 2016年7月11日, by : kumassy