Jetson TX2 tensorflow安装+keras安装

使用官方自带的安装方法

TX2产品官网自带安装方法,个人推荐这个,网址如下:https://docs.nvidia.com/deeplearning/dgx/install-tf-jetsontx2/index.html
在安装TensorFlow之前,请确保安装JetPack 3.3,TensorRT已包含在JetPack包中。

$: pip install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp33 tensorflow-gpu

注意:使用 pip3 如果使用的是Python 3.5版。

nvidia@tegra-ubuntu:~$ sudo pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp33 tensorflow-gpu
The directory '/home/nvidia/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nvidia/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Looking in indexes: https://pypi.org/simple, https://developer.download.nvidia.com/compute/redist/jp33
Collecting tensorflow-gpu
  Downloading https://developer.download.nvidia.com/compute/redist/jp33/tensorflow-gpu/tensorflow_gpu-1.9.0+nv18.8-cp35-cp35m-linux_aarch64.whl (91.1MB)
    100% |████████████████████████████████| 91.2MB 707kB/s 
Requirement already satisfied: wheel>=0.26 in /usr/lib/python3/dist-packages (from tensorflow-gpu) (0.29.0)
Requirement already satisfied: setuptools<=39.1.0 in /usr/lib/python3/dist-packages (from tensorflow-gpu) (20.7.0)
Collecting termcolor>=1.1.0 (from tensorflow-gpu)
  Downloading https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
Collecting absl-py>=0.1.6 (from tensorflow-gpu)
  Downloading https://files.pythonhosted.org/packages/0c/63/f505d2d4c21db849cf80bad517f0065a30be6b006b0a5637f1b95584a305/absl-py-0.6.1.tar.gz (94kB)
    100% |████████████████████████████████| 102kB 329kB/s 
Requirement already satisfied: numpy>=1.11.0 in /usr/local/lib/python3.5/dist-packages (from tensorflow-gpu) (1.15.4)
Requirement already satisfied: six>=1.10.0 in /usr/lib/python3/dist-packages (from tensorflow-gpu) (1.10.0)
Collecting astor>=0.6.0 (from tensorflow-gpu)
  Downloading https://files.pythonhosted.org/packages/35/6b/11530768cac581a12952a2aad00e1526b89d242d0b9f59534ef6e6a1752f/astor-0.7.1-py2.py3-none-any.whl
Collecting tensorboard<1.10.0,>=1.9.0 (from tensorflow-gpu)
  Downloading https://files.pythonhosted.org/packages/9e/1f/3da43860db614e294a034e42d4be5c8f7f0d2c75dc1c428c541116d8cdab/tensorboard-1.9.0-py3-none-any.whl (3.3MB)
    100% |████████████████████████████████| 3.3MB 84kB/s 
Collecting grpcio>=1.8.6 (from tensorflow-gpu)
  Downloading https://files.pythonhosted.org/packages/98/df/e181e36dc54fc0166d59cf2cb25991e33df52090922495175b2e2abc1381/grpcio-1.17.1.tar.gz (14.6MB)
    100% |████████████████████████████████| 14.6MB 102kB/s 
Collecting gast>=0.2.0 (from tensorflow-gpu)
  Downloading https://files.pythonhosted.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz
Collecting protobuf>=3.4.0 (from tensorflow-gpu)
  Downloading https://files.pythonhosted.org/packages/77/78/a7f1ce761e2c738e209857175cd4f90a8562d1bde32868a8cd5290d58926/protobuf-3.6.1-py2.py3-none-any.whl (390kB)
    100% |████████████████████████████████| 399kB 171kB/s 
Collecting werkzeug>=0.11.10 (from tensorboard<1.10.0,>=1.9.0->tensorflow-gpu)
  Downloading https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl (322kB)
    100% |████████████████████████████████| 327kB 134kB/s 
Collecting markdown>=2.6.8 (from tensorboard<1.10.0,>=1.9.0->tensorflow-gpu)
  Downloading https://files.pythonhosted.org/packages/7a/6b/5600647404ba15545ec37d2f7f58844d690baf2f81f3a60b862e48f29287/Markdown-3.0.1-py2.py3-none-any.whl (89kB)
    100% |████████████████████████████████| 92kB 88kB/s 
Installing collected packages: termcolor, absl-py, astor, werkzeug, markdown, protobuf, tensorboard, grpcio, gast, tensorflow-gpu
  Running setup.py install for termcolor ... done
  Running setup.py install for absl-py ... done
  Running setup.py install for grpcio ... done
  Running setup.py install for gast ... done
Successfully installed absl-py-0.6.1 astor-0.7.1 gast-0.2.0 grpcio-1.17.1 markdown-3.0.1 protobuf-3.6.1 tensorboard-1.9.0 tensorflow-gpu-1.9.0+nv18.8 termcolor-1.1.0 werkzeug-0.14.1

编译安装TensorFlow

也可尝试源码编译的方式进行安装,谨慎其间还是不要尝试,因为各种报错。。。以下为我自己编译的过程。

安装cudnn

安装tensorflow,刷机后发现import tensorflow 并没有,于是自己编译tensorflow,查看CUDA版本为CUDA9,但是没有cudnn,在https://developer.nvidia.com/cudnn 上下载了cudnn-9.0-linux-x64-v7.4.2.24.solitairetheme8,修改其后缀为tgz格式cudnn-9.0-linux-x64-v7.4.2.24.tgz,将其拷贝进ubuntu指定的文件夹中,比如我在/usr/local/下建立了一个文件夹。

$ sudo mkdir cuda_cudnn

此时解压文件

$ sudo tar -xvf cudnn-9.0-linux-x64-v7.4.2.24.tgz

发现有cuda和include两个文件夹,记得路径为:/usr/local/cuda_cudnn/
将解压后的文件中的lib64文件夹关联到环境变量中

$ cd ~
$ sudo gedit .bashrc

在文件最后一行加入,一定是你自己解压的路径

 export LD_LIBRARY_PATH=/usr/local/cuda_cudnn/cudnn/lib64:$LD_LIBRARY_PATH

之后

$ source .bashrc

重启终端,该步骤可以成功的配置cuDNN的Lib文件。
将解压后的cuDNN文件夹中的include文件夹下的cudnn.h 文件拷贝至/usr/local/cuda/include中,由于进入了系统路径,因此执行该操作时需要获取管理员权限。

$ sudo chmod a+r /usr/local/cuda/include/cudnn.h

cuDNN的配置就全部安装完成了。运行 cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2 查看其版本信息,如下:

$ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 4
#define CUDNN_PATCHLEVEL 2
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

安装JAVA

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

其间会有提示,选择ok即可。安装其他库

sudo apt-get install zip unzip autoconf automake libtool curl zlib1g-dev maven -y
sudo apt-get install python-numpy swig python-dev python-pip python-wheel -y

下载 Bazel,此时耗时较长

$ bazel_version=0.10.0 wget https://github.com/bazelbuild/bazel/releases/download/$bazel_version/bazel-$bazel_version-dist.zip
$ unzip bazel-$bazel_version-dist.zip -d bazel-dist
$ sudo chmod -R ug+rwx bazel-dist
$ cd bazel-dist
$ ./compile.sh 

创建交换文件

由于编译 TensorFlow 需要大约 8GB 空间,我们将创建一个交换文件。 这里 ~/data 挂载了 硬盘,将交换文件建立在该目录下。 (挂载方式可以查看博文,我这里用的旧的笔记本硬盘)

nvidia@tegra-ubuntu:~/data$ sudo mkdir swap
nvidia@tegra-ubuntu:~/data$ sudo chmod 777 swap/
nvidia@tegra-ubuntu:~/data$ sudo fallocate -l 8G swapfile
nvidia@tegra-ubuntu:~/data$ sudo chmod 600 swapfile 
nvidia@tegra-ubuntu:~/data$ ls
swap  swapfile
nvidia@tegra-ubuntu:~/data$ sudo mkswap swapfile 
Setting up swapspace version 1, size = 8 GiB (8589930496 bytes)
no label, UUID=40bbd9d8-131f-45c4-8d65-1f7054ccc4f3
nvidia@tegra-ubuntu:~/data$ sudo swapon swapfile
nvidia@tegra-ubuntu:~/data$ free -m
              total        used        free      shared  buff/cache   available
Mem:           7846        2302        4610          49         933        5402
Swap:          8191           0        8191
nvidia@tegra-ubuntu:~/data$ swapon -s
Filename				Type		Size	Used	Priority
/home/nvidia/data/swapfile             	file    	8388604	0	-1

编译tensorflow源码

git clone https://github.com/tensorflow/tensorflow,首先git config --global http.postBuffer 524288000,否则会报错error: RPC failed; curl 56 GnuTLS recv error (-54): Error ina the pull functi

nvidia@tegra-ubuntu:~$ git config --global http.postBuffer  524288000
nvidia@tegra-ubuntu:~$ sudo git clone https://github.com/tensorflow/tensorflow
Cloning into 'tensorflow'...
remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 492309 (delta 2), reused 7 (delta 0), pack-reused 492297
Receiving objects: 100% (492309/492309), 286.82 MiB | 209.00 KiB/s, done.
Resolving deltas: 100% (394055/394055), done.
Checking connectivity... done.
Checking out files: 100% (15123/15123), done.

git r1.7版本

nvidia@tegra-ubuntu:~$ cd tensorflow/
nvidia@tegra-ubuntu:~/tensorflow$ ls
ACKNOWLEDGMENTS     CODE_OF_CONDUCT.md  ISSUES.md          RELEASE.md   WORKSPACE
ADOPTERS.md         CODEOWNERS          ISSUE_TEMPLATE.md  SECURITY.md
arm_compiler.BUILD  configure           LICENSE            tensorflow
AUTHORS             configure.py        models.BUILD       third_party
BUILD               CONTRIBUTING.md     README.md          tools
nvidia@tegra-ubuntu:~/tensorflow$ sudo git checkout r1.7
[sudo] password for nvidia: 
Branch r1.7 set up to track remote branch r1.7 from origin.
Switched to a new branch 'r1.7'

查看/usr/lib/aarch64-linux-gnu路径下有没有include文件夹,没有则添加修改权限。

nvidia@tegra-ubuntu:/usr/lib/aarch64-linux-gnu$ cd include
bash: cd: include: No such file or directory
nvidia@tegra-ubuntu:/usr/lib/aarch64-linux-gnu$ sudo mkdir include

接着复制 cudnn.h,便于 TensorFlow 找到:

nvidia@tegra-ubuntu:sudo cp /usr/include/cudnn.h /usr/lib/aarch64-linux-gnu/include/cudnn.h

配置

nvidia@tegra-ubuntu:~/tensorflow$ sudo ./configure 
Extracting Bazel installation...
You have bazel 0.10.0- (@non-git) installed.
Please specify the location of python. [Default is /usr/bin/python]: 

Found possible Python library paths:
  /usr/local/lib/python2.7/dist-packages
  /usr/lib/python2.7/dist-packages
Please input the desired Python library path to use.  Default is [/usr/local/lib/python2.7/dist-packages]

Do you wish to build TensorFlow with jemalloc as malloc support? [Y/n]: 
jemalloc as malloc support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Google Cloud Platform support? [Y/n]: n
No Google Cloud Platform support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Hadoop File System support? [Y/n]: n
No Hadoop File System support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Amazon S3 File System support? [Y/n]: n
No Amazon S3 File System support will be enabled for TensorFlow.

Do you wish to build TensorFlow with Apache Kafka Platform support? [y/N]: n
No Apache Kafka Platform support will be enabled for TensorFlow.

Do you wish to build TensorFlow with XLA JIT support? [y/N]: n
No XLA JIT support will be enabled for TensorFlow.

Do you wish to build TensorFlow with GDR support? [y/N]: y
GDR support will be enabled for TensorFlow.

Do you wish to build TensorFlow with VERBS support? [y/N]: n
No VERBS support will be enabled for TensorFlow.

Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]: n
No OpenCL SYCL support will be enabled for TensorFlow.

Do you wish to build TensorFlow with CUDA support? [y/N]: y
CUDA support will be enabled for TensorFlow.

Please specify the CUDA SDK version you want to use, e.g. 7.0. [Leave empty to default to CUDA 9.0]: 


Please specify the location where CUDA 9.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: 


Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 7.0]: 


Please specify the location where cuDNN 7 library is installed. Refer to README.md for more details. [Default is /usr/local/cuda]:


Do you wish to build TensorFlow with TensorRT support? [y/N]: 
No TensorRT support will be enabled for TensorFlow.

Please specify a list of comma-separated Cuda compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus.
Please note that each additional compute capability significantly increases your build time and binary size. [Default is: 3.5,5.2]


Do you want to use clang as CUDA compiler? [y/N]: n
nvcc will be used as CUDA compiler.

Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/bin/gcc]: 


Do you wish to build TensorFlow with MPI support? [y/N]: n
No MPI support will be enabled for TensorFlow.

Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native]: 


Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]: n
Not configuring the WORKSPACE for Android builds.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See tools/bazel.rc for more details.
	--config=mkl         	# Build with MKL support.
	--config=monolithic  	# Config for mostly static monolithic build.
Configuration finished

开始编译

nvidia@tegra-ubuntu:sudo bazel build -c opt --local_resources 3072,4.0,1.0 --verbose_failures --config=cuda //tensorflow/tools/pip_package:build_pip_package

编译时间较长,大约2-3小时。接着安装编译完成的whl文件。

bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
cp /tmp/tensorflow_pkg/tensorflow-1.5.0rc0-cp27-cp27mu-linux_aarch64.whl .
pip install ./tensorflow-1.5.0rc0-cp27-cp27mu-linux_aarch64.whl
pip install --upgrade pip

Jetson TX2 tensorflow安装+keras安装_第1张图片

安装keras

先安装libhdf5-dev、python-h5py,之后再安装keras

sudo apt-get install libhdf5-dev
sudo apt-get install python-h5py
sudo pip3 install keras
nvidia@tegra-ubuntu:~$ sudo apt-get install libhdf5-dev
[sudo] password for nvidia: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libjbig-dev libjpeg62 libllvm5.0 liblzma-dev libqmi-glib1 libtiffxx5 ubuntu-core-launcher
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  hdf5-helpers libaec-dev libaec0 libhdf5-10 libhdf5-cpp-11 libjpeg-dev libjpeg-turbo8-dev
  libjpeg8-dev libsz2
Suggested packages:
  libhdf5-doc
The following packages will be REMOVED:
  libjpeg62-dev
The following NEW packages will be installed:
  hdf5-helpers libaec-dev libaec0 libhdf5-10 libhdf5-cpp-11 libhdf5-dev libjpeg-dev
  libjpeg-turbo8-dev libjpeg8-dev libsz2
0 upgraded, 10 newly installed, 1 to remove and 0 not upgraded.
Need to get 6,224 kB/6,448 kB of archives.
After this operation, 39.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ports.ubuntu.com/ubuntu-ports xenial-updates/universe arm64 hdf5-helpers arm64 1.8.16+docs-4ubuntu1.1 [12.5 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports xenial/universe arm64 libaec0 arm64 0.3.2-1 [16.5 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports xenial/universe arm64 libsz2 arm64 0.3.2-1 [4,916 B]
Get:4 http://ports.ubuntu.com/ubuntu-ports xenial-updates/universe arm64 libhdf5-10 arm64 1.8.16+docs-4ubuntu1.1 [776 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports xenial-updates/universe arm64 libhdf5-cpp-11 arm64 1.8.16+docs-4ubuntu1.1 [94.4 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 libjpeg-dev arm64 8c-2ubuntu8 [1,546 B]
Get:7 http://ports.ubuntu.com/ubuntu-ports xenial/universe arm64 libaec-dev arm64 0.3.2-1 [14.8 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports xenial-updates/universe arm64 libhdf5-dev arm64 1.8.16+docs-4ubuntu1.1 [5,302 kB]
Fetched 6,224 kB in 9s (688 kB/s)                                                            
(Reading database ... 186390 files and directories currently installed.)
Removing libjpeg62-dev:arm64 (1:6b2-2) ...
Selecting previously unselected package hdf5-helpers.
(Reading database ... 186374 files and directories currently installed.)
Preparing to unpack .../hdf5-helpers_1.8.16+docs-4ubuntu1.1_arm64.deb ...
Unpacking hdf5-helpers (1.8.16+docs-4ubuntu1.1) ...
Selecting previously unselected package libaec0:arm64.
Preparing to unpack .../libaec0_0.3.2-1_arm64.deb ...
Unpacking libaec0:arm64 (0.3.2-1) ...
Selecting previously unselected package libsz2:arm64.
Preparing to unpack .../libsz2_0.3.2-1_arm64.deb ...
Unpacking libsz2:arm64 (0.3.2-1) ...
Selecting previously unselected package libhdf5-10:arm64.
Preparing to unpack .../libhdf5-10_1.8.16+docs-4ubuntu1.1_arm64.deb ...
Unpacking libhdf5-10:arm64 (1.8.16+docs-4ubuntu1.1) ...
Selecting previously unselected package libhdf5-cpp-11:arm64.
Preparing to unpack .../libhdf5-cpp-11_1.8.16+docs-4ubuntu1.1_arm64.deb ...
Unpacking libhdf5-cpp-11:arm64 (1.8.16+docs-4ubuntu1.1) ...
Selecting previously unselected package libjpeg-turbo8-dev:arm64.
Preparing to unpack .../libjpeg-turbo8-dev_1.4.2-0ubuntu3.1_arm64.deb ...
Unpacking libjpeg-turbo8-dev:arm64 (1.4.2-0ubuntu3.1) ...
Selecting previously unselected package libjpeg8-dev:arm64.
Preparing to unpack .../libjpeg8-dev_8c-2ubuntu8_arm64.deb ...
Unpacking libjpeg8-dev:arm64 (8c-2ubuntu8) ...
Selecting previously unselected package libjpeg-dev:arm64.
Preparing to unpack .../libjpeg-dev_8c-2ubuntu8_arm64.deb ...
Unpacking libjpeg-dev:arm64 (8c-2ubuntu8) ...
Selecting previously unselected package libaec-dev:arm64.
Preparing to unpack .../libaec-dev_0.3.2-1_arm64.deb ...
Unpacking libaec-dev:arm64 (0.3.2-1) ...
Selecting previously unselected package libhdf5-dev.
Preparing to unpack .../libhdf5-dev_1.8.16+docs-4ubuntu1.1_arm64.deb ...
Unpacking libhdf5-dev (1.8.16+docs-4ubuntu1.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up hdf5-helpers (1.8.16+docs-4ubuntu1.1) ...
Setting up libaec0:arm64 (0.3.2-1) ...
Setting up libsz2:arm64 (0.3.2-1) ...
Setting up libhdf5-10:arm64 (1.8.16+docs-4ubuntu1.1) ...
Setting up libhdf5-cpp-11:arm64 (1.8.16+docs-4ubuntu1.1) ...
Setting up libjpeg-turbo8-dev:arm64 (1.4.2-0ubuntu3.1) ...
Setting up libjpeg8-dev:arm64 (8c-2ubuntu8) ...
Setting up libjpeg-dev:arm64 (8c-2ubuntu8) ...
Setting up libaec-dev:arm64 (0.3.2-1) ...
Setting up libhdf5-dev (1.8.16+docs-4ubuntu1.1) ...
update-alternatives: using /usr/lib/aarch64-linux-gnu/pkgconfig/hdf5-serial.pc to provide /usr/lib/aarch64-linux-gnu/pkgconfig/hdf5.pc (hdf5.pc) in auto mode
Processing triggers for libc-bin (2.23-0ubuntu10) ...
nvidia@tegra-ubuntu:~$ sudo apt-get install python-h5py
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libjbig-dev libjpeg62 libllvm5.0 liblzma-dev libqmi-glib1 libtiffxx5 ubuntu-core-launcher
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  python-six
The following NEW packages will be installed:
  python-h5py python-six
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 423 kB of archives.
After this operation, 2,297 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ports.ubuntu.com/ubuntu-ports xenial/main arm64 python-six all 1.10.0-3 [10.9 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports xenial/universe arm64 python-h5py arm64 2.6.0-1 [412 kB]
Fetched 423 kB in 2s (189 kB/s)       
Selecting previously unselected package python-six.
(Reading database ... 186601 files and directories currently installed.)
Preparing to unpack .../python-six_1.10.0-3_all.deb ...
Unpacking python-six (1.10.0-3) ...
Selecting previously unselected package python-h5py.
Preparing to unpack .../python-h5py_2.6.0-1_arm64.deb ...
Unpacking python-h5py (2.6.0-1) ...
Setting up python-six (1.10.0-3) ...
Setting up python-h5py (2.6.0-1) ...
nvidia@tegra-ubuntu:~$ sudo pip3 install keras
The directory '/home/nvidia/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nvidia/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting keras
  Downloading https://files.pythonhosted.org/packages/5e/10/aa32dad071ce52b5502266b5c659451cfd6ffcbf14e6c8c4f16c0ff5aaab/Keras-2.2.4-py2.py3-none-any.whl (312kB)
    100% |████████████████████████████████| 317kB 41kB/s 
Collecting scipy>=0.14 (from keras)
  Downloading https://files.pythonhosted.org/packages/ea/c8/c296904f2c852c5c129962e6ca4ba467116b08cd5b54b7180b2e77fe06b2/scipy-1.2.0.tar.gz (23.3MB)
    100% |████████████████████████████████| 23.3MB 44kB/s 
Collecting keras-applications>=1.0.6 (from keras)
  Downloading https://files.pythonhosted.org/packages/3f/c4/2ff40221029f7098d58f8d7fb99b97e8100f3293f9856f0fb5834bef100b/Keras_Applications-1.0.6-py2.py3-none-any.whl (44kB)
    100% |████████████████████████████████| 51kB 18kB/s 
Requirement already satisfied: numpy>=1.9.1 in /usr/local/lib/python3.5/dist-packages (from keras) (1.15.4)
Collecting keras-preprocessing>=1.0.5 (from keras)
  Downloading https://files.pythonhosted.org/packages/fc/94/74e0fa783d3fc07e41715973435dd051ca89c550881b3454233c39c73e69/Keras_Preprocessing-1.0.5-py2.py3-none-any.whl
Collecting pyyaml (from keras)
  Downloading https://files.pythonhosted.org/packages/9e/a3/1d13970c3f36777c583f136c136f804d70f500168edc1edea6daa7200769/PyYAML-3.13.tar.gz (270kB)
    100% |████████████████████████████████| 276kB 49kB/s 
Requirement already satisfied: six>=1.9.0 in /usr/lib/python3/dist-packages (from keras) (1.10.0)
Collecting h5py (from keras)
  Downloading https://files.pythonhosted.org/packages/43/27/a6e7dcb8ae20a4dbf3725321058923fec262b6f7835179d78ccc8d98deec/h5py-2.9.0.tar.gz (287kB)
    100% |████████████████████████████████| 296kB 25kB/s 
Installing collected packages: scipy, h5py, keras-applications, keras-preprocessing, pyyaml, keras
  Running setup.py install for scipy ... done
  Running setup.py install for h5py ... done
  Running setup.py install for pyyaml ... done
Successfully installed h5py-2.9.0 keras-2.2.4 keras-applications-1.0.6 keras-preprocessing-1.0.5 pyyaml-3.13 scipy-1.2.0
nvidia@tegra-ubuntu:~$ python3
Python 3.5.2 (default, Nov 12 2018, 13:43:14) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import keras
Using TensorFlow backend.
>>> 

你可能感兴趣的:(图像处理,OpenCV,TX2)