栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

RK3399pro装labelme

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

RK3399pro装labelme

一、硬件与系统

操作系统(cat /etc/issue):Ubuntu 18.04
硬件(lscpu):aarch64,Cotex-A53,

二、基本情况

嵌入式系统里面只有python3.5,labelme只能支持python3.6以上。由于嵌入式系统空间有限,anaconda不太方便安装,版本管理就不那么方便。不同于x86架构,安装简单的labelme花了九牛二虎之力。

三、排坑之路
  1. 安装python3.6之后,pip总是对应python3.5,在知乎上找到这篇多版本Python安装pip及pip版本管理终极教程非常受用。按其步骤安装好python3.6对应的pip,然后再~/.bashrc中添加pip3.6的环境变量,这样就可以用pip3.6 install labelme直接安装了。

  2. 直接安装labelme,还需要相应的依赖包,安转PyQt5时报错:AttributeError: module ‘sipbuild.api’ has no attribute ‘prepare_metadata_for_build_wheel’,之后在Pycharm论坛找到方法,不用pip安装,直接apt-get install安装:

sudo apt-get install PyQt-5
sudo apt install python3-pyqt5 python3-pyqt5.{qtsvg,qtwebkit,qtopengl}
  1. 继续安装labelme时,需要依赖matplotlib,又报错:ERROR: Command errored out with exit status -4:,搜索之后发现是numpy版本不对,需要改成1.9.4,便能正常安装matplotlib。

  2. 继续安装labelme,报错说matplotlib的版本要小于3.3,刚刚装的版本是3.3.4,但切换至3.2.0后,还是报错:error: command ‘aarch64-linux-gnu-gcc’ failed with exit status 1,找了好久没找到解决方法,索性再切换版本,pip3.6 install matplotlib==3.0.0,这下有了更明确的报错信息,甚至还给了解决方案:

sudo apt-get install libfreetype6-dev pkg-config libpng12-dev
pip3.6 install matplotlib=3.0.0
pip3.6 install labelme
  1. 终于装上labelme,打开之后,又来个回马枪:importError: cannot import name ‘get_backend’ from ‘matplotlib’,还是版本的原因,死马当活马医,切换matplotlib版本pip3.6 install matplotlib==3.0.1。

最后终于能够用labelme查看文件:

原文

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/348320.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号