按照官網流程,成功完成了TensorFlow的編譯工做,地址以下:html
http://www.tensorfly.cn/tfdoc/get_started/os_setup.htmlhtml5
我本地的環境:mac,Python2.7python
但在打wheel和安裝wheel包的時候,碰到了幾個坑爹問題。現記錄以下:macos
一、命令:markdown
bazel-bin/tensorflow/tools/pip_package/build_pip_package /Users/mengfeiyang/Downloads/tensorflow_pkg
錯誤:post
bazel-bin/tensorflow/tools/pip_package/build_pip_package: line 163: tools/python_bin_path.sh: No such file or directory
解決方案:執行./configure 並一路回車便可ui
二、命令:日誌
bazel-bin/tensorflow/tools/pip_package/build_pip_package /Users/mengfeiyang/Downloads/tensorflow_pkg
錯誤:error: invalid command 'bdist_wheel'
解決方案:pip install wheelhtm
三、命令:ip
bazel-bin/tensorflow/tools/pip_package/build_pip_package /Users/mengfeiyang/Downloads/tensorflow_pkg
錯誤:
OSError: [Errno 1] Operation not permitted: '/tmp/pip-jra9mX-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
解決方案:
sudo pip install --upgrade --ignore-installed six /Users/mengfeiyang/Downloads/tensorflow_pkg/tensorflow-1.4.0-cp27-cp27m-macosx_10_13_intel.whl
安裝成功日誌: Successfully installed absl-py-0.1.5 backports.weakref-1.0.post1 bleach-1.5.0 enum34-1.1.6 funcsigs-1.0.2 html5lib-0.9999999 markdown-2.6.9 mock-2.0.0 numpy-1.13.3 pbr-3.1.1 protobuf-3.5.0.post1 setuptools-38.2.3 six-1.11.0 tensorflow-1.4.0 tensorflow-tensorboard-0.1.8 werkzeug-0.12.2 wheel-0.30.0