内容发布更新时间 : 2025/1/21 2:29:11星期一 下面是文章的全部内容请认真阅读。
一、安装jdk8
$ sudo apt-get install software-properties-common $ sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
二、安装bazel的其他依赖包
$ sudo apt-get install pkg-config zip g++ zlib1g-dev unzip
三、安装python环境(二选一) 1.python2.7环境
$ sudo apt-get install python-numpy swig python-dev python-wheel python-pip python-matplotlib 2.python3.x环境
$ sudo apt-get install python3-numpy swig python3-dev python3-wheel python3-pip python3-matplotlib
四、安装bazel
$ echo \
http://storage.googleapis.com/bazel-apt stable jdk1.8\$ curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
$ sudo apt-get update && sudo apt-get install bazel
$ sudo apt-get upgrade bazel
五、切换python工作环境(这个根据习惯和嗜好) $ sudo rm /usr/bin/python
$ sudo ln -s /usr/bin/python3.5 /usr/bin/python
六、下载tensorflow1.0.0
https://codeload.github.com/tensorflow/models/zip/master $ sudo wget
https://codeload.github.com/tensorflow/tensorflow/tar.gz/v1.0.0
$ sudo tar –xzvf tensorf… 七、编译tensorflow $ cd tensorflow $ ./configure
$ sudo bazel build –c
//tensorflow/tools/pip_package:build_pip_package $ sudo
bazel-bin/tensorflow/tools/pip_package/build_pip_package/tmp/tensorflow_pkg $ sudo pip install
/tmp/tensorflow_pkg/tensorflow…
安装pip(此处有坑啊) 1、下载pip安装包
[root@localhost ~]# wget
https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9 2、解压pip安装包
[root@localhost ~]# tar xf pip-9.0.1.tar.gz 3、安装pip