龙芯 python_在UOS20-龙芯(MIPS64EL)上安装 opencv-python

使用pip 安装

$ pip install opencv-python

Defaulting to user installation because normal site-packages is not writeable

ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none)

ERROR: No matching distribution found for opencv-python

安装失败提示到不到。

上 https://pypi.org/ 查找,得到的是结果这个是非官方的源,是爱好者个人维护,所以pip 没有自动下载源码,因为上面没提供源码。源码在作者的github 里面。操作如下图:

2. 下载源码

$ git clone --depth 1 https://github.com/skvark/opencv-python.git

修改源gitee以加快代码下载速度

$ cat .gitmodules

[submodule "opencv"]

path = opencv

url = https://gitee.com/mirrors/opencv.git

[submodule "opencv_contrib"]

path = opencv_contrib

url = https://gitee.com/mirrors/opencv_contrib.git

[submodule "multibuild"]

path = multibuild

url = https://gitee.com/useptonly/multibuild.git

安装编译依赖

$ sudo apt install qt4-dev-tools qt4-qmake

$ sudo apt install cmake

$ sudo apt install python3-numpy

$ pip install scikit-build

编译

$ python3 setup.py bdist_wheel

编译好的文件:

./dist/opencv_python-4.3.0+3073e9e-cp37-cp37m-linux_mips64.whl

参考

[1] https://stackoverflow.com/questions/10315021/installing-opencv-for-python3

[2] https://stackoverflow.com/questions/20953273/install-opencv-for-python-3-3/21212023#21212023

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值