RK3399Pro python环境相关配置
程序员文章站
2022-06-21 21:54:12
RK3399Pro的环境配置opencv,tensorflow,pytorch的安装1.配置环境依赖项2.安装pip3,numpy,opencv等3.安装tensorflow,keras,pytorch4.安装图像工具,否则无法显示图片5.添加交换空间opencv,tensorflow,pytorch的安装本人rk3399pro 安装系统为ubuntu18.04系统。1.配置环境依赖项sudo apt-get update sudo apt-get install build-essential...
RK3399Pro的环境配置
opencv,tensorflow,pytorch的安装
本人rk3399pro 安装系统为ubuntu18.04系统。
1.配置环境依赖项
sudo apt-get update
sudo apt-get install build-essential cmake git pkg-config
sudo apt-get install libjpeg8-dev libtiff5-dev libpng-dev
sudo apt-get install libgtk2.0-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libatlas-base-dev gfortran libhdf5-dev libtbb-dev libeigen3-dev
sudo apt-get install gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav
sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-bad1.0-dev
2.安装pip3,numpy,opencv等
这里opencv采用apt形式安装安装版本为3.2,如需要安装高版本需要源码编译。
sudo apt-get install python3-dev
sudo apt-get install python3-pip
sudo pip3 install --upgrade pip
sudo pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
sudo apt-get install python3-numpy
sudo apt-get install python3-opencv
3.安装tensorflow,keras,pytorch
下面一些whl包,rk3399的github也有下载,这里也贴出网盘地址:
链接:https://pan.baidu.com/s/1a9_Osl4lyHqlzwTSx2YaRA 提取码:x9us
sudo pip3 install h5py
sudo pip3 install tensorflow-1.13.1-cp36-none-linux_aarch64.whl
sudo pip3 install onnx-1.4.1-cp36-cp36m-linux_aarch64.whl
sudo pip3 install scipy-1.2.0-cp36-cp36m-linux_aarch64.whl
sudp pip3 install keras==2.1.5
sudo apt-get install python3-matplotlib
sudo pip3 install pillow==6.2.0
sudo apt-get install libopenblas-dev cython3 libatlas-dev m4 libblas-dev cmake
pip3 install pyyaml
sudo pip3 install torch-1.1.0a0+7e73783-cp36-cp36m-linux_aarch64.whl
pip3 install torchvision
#安装rknn python的API
sudo pip3 install rknn_toolkit-1.3.0-cp36-cp36m-linux_aarch64.whl
4.安装图像工具,否则无法显示图片
如何是界面情况下,可能会出现无法显示图片的情况,需要装读图软件。
sudo apt-get install imagemagick
5.添加交换空间
rk3399pro内存4G,编译时可能不太够。
mkdir swap
cd swap
# (1024*4000000=4G)
sudo dd if=/dev/zero of=swapfile bs=1024 count=4000000
sudo mkswap swapfile
chmod 0600 swapfile
sudo swapon swapfile
使用结束释放:
swapoff -a
本文地址:https://blog.csdn.net/djj199301111/article/details/107633869
推荐阅读
-
Win10下python3.5和python2.7环境变量配置教程
-
Pycharm打开已有项目配置python环境
-
MacOS配置Anaconda3(Miniconda3)下Python3.6、Python3.7和Python2.7环境和基础机器学习、神经网络相关包详解(版本号对应)
-
CentOS6.9 Python环境配置(python2.7、pip、virtualenv)
-
python解释器安装及环境变量配置
-
selenium+python环境配置教程详解
-
VS2017 配置 Python 开发环境
-
Linux下python3.6.1环境配置教程
-
Python下载和安装步骤(配置开发环境详细)
-
Notepad++配置C++/C/python环境