NanoPi R1 安装 python环境 及opencv
(友善NanoPi 1G RAM/8GB eMMC)
安装python2/python3 pip/pip3 环境
sudo apt-get install python
sudo apt-get install python3
sudo apt-get install python-pip
sudo apt-get install python3-pip
wget https://bootstrap.pypa.io/pip/3.5/get-pip.py
sudo python get-pip.py
sudo python3 get-pip.py
编译源代码的方式安装,在最后执行sudo make install的时候,出现如下警告
The directory '/home/fkjava/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled.
出现这个警告的原因很简单:在用户目录下的~/.cache/pip/http和~/.cache/pip两个目录或者它的上级目录拥有者,不是root用户引起的。因为使用了sudo执行,所以其实这些缓存文件应该在root用户的Home目录里面的。
此时此刻,我们需要在sudo后面加上-H参数即可,就会在执行sudo的时候,把HOME变量的值改为root的Home目录。
例如,执行命令为:sudo -H make install
编译依赖环境:
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
pip3 install --upgrade pip setuptools wheel
sudo apt install libgl1-mesa-glx
opencv py 官方说明:
https://docs.opencv.org/master/d2/de6/tutorial_py_setup_in_ubuntu.html
关于ERROR: Failed building wheel for dlib的解决方案
https://blog.csdn.net/weixin_43738067/article/details/105697827
修改swap大小:
https://blog.csdn.net/u010429286/article/details/79219230
dlib and face_recognition 安装说明:
https://www.pyimagesearch.com/2017/05/01/install-dlib-raspberry-pi/
https://gist.github.com/ageitgey/1ac8dbe8572f3f533df6269dab35df65
夸克开发板上安装
sudo pip install scipy
即失败,板子会自己重启,可能因为内存太小(只有512M)
安装opencv:
需要指定国内源,否则可能大量超时报错。
python2版本,安装不成功
sudo -H pip2 install opencv-python -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
python3版本,安装不成功
sudo -H pip3 install opencv-python -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步