Toybrick

标题: 计算棒上安装opencv报错 [打印本页]

作者: harbor.gong    时间: 2020-5-2 10:08
标题: 计算棒上安装opencv报错

运行demo脚本时提示没有cv2模块,通过pip安装总是报错,请问有没有什么解决建议:

[toybrick@rk1808 rockx]$ python3 -m pip install opencv-python --user
ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none)
ERROR: No matching distribution found for opencv-python

[toybrick@rk1808 rockx]$ pip3 install opencv-python --user -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Looking in indexes: http://pypi.douban.com/simple/
ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none)
ERROR: No matching distribution found for opencv-python




作者: jefferyzhang    时间: 2020-5-2 10:15
用官方源装。你用douban源人家没有aarch64的opencv怎么装
作者: harbor.gong    时间: 2020-5-2 11:20
jefferyzhang 发表于 2020-5-2 10:15
用官方源装。你用douban源人家没有aarch64的opencv怎么装

我贴了两种报错的情况, 最开始没有指定源, 应该缺省用官方源吧。

作者: jefferyzhang    时间: 2020-5-2 11:51
harbor.gong 发表于 2020-5-2 11:20
我贴了两种报错的情况, 最开始没有指定源, 应该缺省用官方源吧。

试下dnf install python3-opencv 有没有
作者: harbor.gong    时间: 2020-5-2 20:20
jefferyzhang 发表于 2020-5-2 11:51
试下dnf install python3-opencv 有没有

[toybrick@rk1808 dnf]$ sudo dnf install python3-opencv
Error: Failed to synchronize cache for repo 'fedora-modular'

在网上找了些别人的解决方法,试过了都不行。


作者: jefferyzhang    时间: 2020-5-2 21:57
harbor.gong 发表于 2020-5-2 20:20
[toybrick@rk1808 dnf]$ sudo dnf install python3-opencv
Error: Failed to synchronize cache for repo ...

你这不行是跟官方dnf源连不上,先让1808能访问外网,再dnf clean /update/upgrade 然后 安装cv
作者: harbor.gong    时间: 2020-5-2 22:48
jefferyzhang 发表于 2020-5-2 21:57
你这不行是跟官方dnf源连不上,先让1808能访问外网,再dnf clean /update/upgrade 然后 安装cv ...

谢谢,dnf update后安装成功了。

后面pip安装 rockx 又不行了,要麻烦再帮忙看看:
[toybrick@rk1808 ~]$ python3 -m pip install --user rockx
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
ERROR: Could not find a version that satisfies the requirement rockx (from versions: none)
ERROR: No matching distribution found for rockx


作者: jefferyzhang    时间: 2020-5-2 23:10
你这是改了我们官方源么?rockx在我们官方源上才有,直接安装当然没有。
如果你不是toybrick的产品,那你需要自己手动拷贝发布包进去安装,请询问你的代理商
作者: harbor.gong    时间: 2020-5-2 23:43
本帖最后由 harbor.gong 于 2020-5-2 23:45 编辑
jefferyzhang 发表于 2020-5-2 23:10
你这是改了我们官方源么?rockx在我们官方源上才有,直接安装当然没有。
如果你不是toybrick的产品,那你需 ...

京东上买的1808 AI stick, 拿到是新的没有开封的。[toybrick@rk1808 rockx]$ uname -a
Linux rk1808.tb-rk1808s0 4.4.167 #1 SMP PREEMPT Fri Aug 16 20:40:58 CST 2019 aarch64 aarch64 aarch64 GNU/Linux



作者: jefferyzhang    时间: 2020-5-2 23:52
harbor.gong 发表于 2020-5-2 23:43
京东上买的1808 AI stick, 拿到是新的没有开封的。[toybrick@rk1808 rockx]$ uname -a
Linux rk1808.tb-r ...

dnf update/ upgrade 没有的话就按发布贴手动安装rockx
作者: harbor.gong    时间: 2020-5-3 10:50
pip3 install --user rockx -i http://repo.rock-chips.com/pypi/simple --trusted-host=repo.rock-chips.com
通过指定上面的地址安装成功了。

谢谢版主及时帮助,
作者: bobbyeva    时间: 2020-6-22 16:48
Total download size: 119 M
Installed size: 460 M
Downloading Packages:
版主,出现出现如下问题:
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Error downloading packages:
  Curl error (28): Timeout was reached for https://mirrors.fedoraproject.or ... 28&arch=aarch64 [Resolving timed out after 30000 milliseconds]

链接一直timeout如何解决?




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3