当前位置:网站首页>Jetson nano installs tensorflow GPU and problem solving
Jetson nano installs tensorflow GPU and problem solving
2022-07-01 08:50:00 【Turing.】
**
Jetson Nano install TensorFlow GPU And problem solving
**
1. install pip3 And change the source installation
nano Bring their own python3.6.9
sudo apt install python3-pip python3-dev
If you want to update after downloading pip3 Version of , Temporarily use Tsinghua source
python3 -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple
2. Install dependencies and other learning packages
sudo apt install python3-scipy -y
sudo apt install python3-pandas -y
sudo apt install python3-sklearn -y
sudo apt install python3-seaborn -y
(1)nano Already brought cuda, Just in .bashrc Add the following to the file
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
The input terminal nvcc -V View version .
Cuda compilation tools, release 10.2, V10.2.89
(2) Install various dependencies
sudo apt-get update
sudo apt install libhdf5-serial-dev hdf5-tools libhdf5-dev zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev gfortran
sudo pip3 install -U numpy==1.16.1 future==0.18.2 mock==3.0.5 h5py==2.10.0 keras_preprocessing==1.1.1 keras_applications==1.0.8 gast==0.2.2 futures protobuf pybind11
(3) install TensorFlow GPU edition
Method 1 :
Use pip3 install TensorFlow, This command will install and JetPack 4.4 Compatible TensorFlow Latest version ( Bloggers use this command to successfully install TensorFlow2.3.0, The installation process is long , Yours JetPack Version if 4.5 Will v44 Change it to v45 that will do ):
sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v44 tensorflow
TensorFlow edition 2 It's recently released , And with TensorFlow 1.x Not fully backward compatible . If you want to use TensorFlow 1.x software package , You can do this by TensorFlow The version is specified as less than 2 To install it , As the following command shows :
sudo pip3 install --pre --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v44 'tensorflow<2'
Method 2 :
You can also go to the official website to select more versions to download :
Download the corresponding version of .whl File and then use pip Command installation, such as : Official website
pip3 install tensorflow-1.15.5+nv22.3-cp38-cp38-linux_aarch64.whl
Method 3 :
Refer to the installation method given on the official website https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html
3. test
One time input of terminal
python3
import tensorflow as tf
# Output hint :
tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.2
a = tf.constant(1.)
b = tf.constant(2.)
print(a+b)
# Output results :
# tf.Tensor(3.0, shape=(), dtype=float32)
print('GPU:', tf.test.is_gpu_available())
# Output the last sentence as :
# GPU: True
4. Problems and Solutions
(1)python Version low
If you encounter this problem, use the above method 2 to install , And will download .whl Two places in the file protobuf>=3.6.1 Change it to protobuf==3.6.1( You can also upgrade python, I think upgrading python A little bit difficult )
(2)
Execute this command
python3 -m pip install --upgrade --force pip
pip3 install setuptools==33.1.1
边栏推荐
- Interrupt sharing variables with other functions and protection of critical resources
- 用C语言编程:用公式计算:e≈1+1/1!+1/2! …+1/n!,精度为10-6
- Matlab tips (23) matrix analysis -- simulated annealing
- Matlab tips (16) consistency verification of matrix eigenvector eigenvalue solution -- analytic hierarchy process
- LogBack
- 固定资产管理系统让企业动态掌握资产情况
- MySQL8.0学习记录17 -Create Table
- 一文纵览主流 NFT 市场平台版税、服务费设计
- LogBack
- 1.jetson与摄像头的对接
猜你喜欢
Ape anthropology topic 20 (the topic will be updated from time to time)
Advanced level of C language pointer (Part 1)
jeecg 重启报40001
《微机原理》——微处理器内部及外部结构
Insert mathematical formula in MD document and mathematical formula in typora
Embedded Engineer Interview Question 3 Hardware
FreeRTOS learning easy notes
What are the differences between the architecture a, R and m of arm V7, and in which fields are they applied?
《微机原理》-绪论
Nacos - service discovery
随机推荐
Software Engineer Interview Question brushing website and experience method
Configuration and startup of Chang'an chain synchronization node
Differences among tasks, threads and processes
Nacos - 服务发现
Glitch free clock switching technology
电视机尺寸与观看距离
Advanced C language pointer (Part 2)
Computer tips
动态代理
I would like to know the process of stock registration and account opening by mobile phone? In addition, is it safe to open a mobile account?
Shell脚本-变量的定义、赋值和删除
Share 7 books I read in the first half of 2022
【MFC开发(17)】高级列表控件List Control
嵌入式工程师常见面试题2-MCU_STM32
R语言观察日志(part24)--初始化设置
Personal decoration notes
Embedded Engineer Interview frequently asked questions
C language student information management system
Shell脚本-特殊变量:Shell $#、$*、[email protected]、$?、$$
Centos7 shell script one click installation of JDK, Mongo, Kafka, FTP, PostgreSQL, PostGIS, pgrouting