【首发-长期更新】为jetson nano安装tensorflow2.0及其相关包

在楼主写这篇教程贴的时候,距离tensorflow2.0发布已过去近6个月了。楼主在高三暑假时购入了jetson nano,但是由于学业比较繁忙,所以板子一直吃灰了。大一寒假正好时间比较多,所以开始继续折腾jetson nano了。并将自己学习jetson nano时的经验进行分享。这样既方便自己后期溯源,又能方便对jetson nano感兴趣的人快速入门,少走弯路。

开源地址:

gitee:www.gitee.com/xddcore/Jetson_Nano

github:www.github.com/xddcore/Jetson_Nano

PS:本篇教程基于目前(2020.1.20)我上传在gitee的教程整理,如需最新教程和代码,还请访问gitee或github。(喜欢的朋友可以点个Star呀,疯狂暗示)

教程正文开始(请大家原谅我三脚猫的英语水平QAQ)

tensorflow 2.0 pack

How to get tensorflow_gpu-2.0.0+nv19.11-cp36-cp36m-linux_aarch64.whl?

链接:https://pan.baidu.com/s/19YReceD2QxgcUwmxgZBqdA
提取码:o2yh

How to ues?

pip3 install tensorflow_gpu-2.0.0+nv19.11-cp36-cp36m-linux_aarch64.whl --user

PS:

0.The python version is must be 3.6

1.The pip version is must be 19.3.1

2.The python setuptools version is must be >=41.0.0

3.The pyasn1-moduled version is must be >=0.2.1

4.The grpcio version is must be >=1.24.3

These have some information to help your achieve above software’s evironment:

if your don’t have pip,you need run:

sudo apt-get install python3-pip python3-dev

if your pip version is too low, you can run:

pip install --upgrade pip --user

and then 1:

sudo vim /usr/bin/pip3

modified file to:

#!/usr/bin/python3
# GENERATED BY DEBIAN

import sys

# Run the main entry point, similarly to how setuptools does it, but because
# we didn't install the actual entry point from setup.py, don't use the
# pkg_resources API.
from pip import __main__
if __name__ == '__main__':
    sys.exit(__main__._main())

and then 2:

sudo vim /usr/local/bin/pip3

modified file to:

#!/usr/bin/python3

# -*- coding: utf-8 -*-
import re
import sys

from pip import __main__

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(__main__._main())

If you run:

pip3 -V

and the terminal print:

pip 19.3.1 from xxxxx #the xxxxx is your url

and the pip 19.3.1 install is success!

if your python setuptools version is too low,you can run:

pip3 install --upgrade setuptools --user

and then the setuptools will be upgrade!

if your pyasn1-modules version is too low,you can run:

pip3 install --upgrade pyasn1-modules --user

and then the pyasn1-modules will be upgrade!

if your grpcio version is too low,you can run:

pip3 install --upgrade grpcio --user

and then the grpcio will be upgrade!

In the end, When you finish above step,and then enter code in terminal:

python3
import tensorflow as tf
tf.__version__

The terminal will print:

'2.0.0'

that mean you success install tensorflow2.0

Good luck!

  • 0
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
自编译tensorflow: 1.python3.5,tensorflow1.12; 2.支持cuda10.0,cudnn7.3.1,TensorRT-5.0.2.6-cuda10.0-cudnn7.3; 3.无mkl支持; 软硬件硬件环境:Ubuntu16.04,GeForce GTX 1080 TI 配置信息: hp@dla:~/work/ts_compile/tensorflow$ ./configure WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown". You have bazel 0.19.1 installed. Please specify the location of python. [Default is /usr/bin/python]: /usr/bin/python3 Found possible Python library paths: /usr/local/lib/python3.5/dist-packages /usr/lib/python3/dist-packages Please input the desired Python library path to use. Default is [/usr/local/lib/python3.5/dist-packages] Do you wish to build TensorFlow with XLA JIT support? [Y/n]: XLA JIT support will be enabled for TensorFlow. Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]: No OpenCL SYCL support will be enabled for TensorFlow. Do you wish to build TensorFlow with ROCm support? [y/N]: No ROCm 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. [Leave empty to default to CUDA 10.0]: Please specify the location where CUDA 10.0 toolkit is installed. Refer to README.md for more details. [Default is /usr/local/cuda]: /usr/local/cuda-10.0 Please specify the cuDNN version you want to use. [Leave empty to default to cuDNN 7]: 7.3.1 Please specify the location where cuDNN 7 library is installed. Refer to README.md for more details. [Default is /usr/local/cuda-10.0]: Do you wish to build TensorFlow with TensorRT support? [y/N]: y TensorRT support will be enabled for TensorFlow. Please specify the location where TensorRT is installed. [Default is /usr/lib/x86_64-linux-gnu]://home/hp/bin/TensorRT-5.0.2.6-cuda10.0-cudnn7.3/targets/x86_64-linux-gnu Please specify the locally installed NCCL version you want to use. [Default is to use https://github.com/nvidia/nccl]: 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: 6.1,6.1,6.1]: Do you want to use clang as CUDA compiler? [y/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]: 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 -Wno-sign-compare]: Would you like to interactively configure ./WORKSPACE for Android builds? [y/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 .bazelrc for more details. --config=mkl # Build with MKL support. --config=monolithic # Config for mostly static monolithic build. --config=gdr # Build with GDR support. --config=verbs # Build with libverbs support. --config=ngraph # Build with Intel nGraph support. --config=dynamic_kernels # (Experimental) Build kernels into separate shared objects. Preconfigured Bazel build configs to DISABLE default on features: --config=noaws # Disable AWS S3 filesystem support. --config=nogcp # Disable GCP support. --config=nohdfs # Disable HDFS support. --config=noignite # Disable Apacha Ignite support. --config=nokafka # Disable Apache Kafka support. --config=nonccl # Disable NVIDIA NCCL support. Configuration finished 编译: bazel build --config=opt --verbose_failures //tensorflow/tools/pip_package:build_pip_package 卸载已有tensorflow: hp@dla:~/temp$ sudo pip3 uninstall tensorflow 安装自己编译的成果: hp@dla:~/temp$ sudo pip3 install tensorflow-1.12.0-cp35-cp35m-linux_x86_64.whl
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值