scikit-learn / python3在树莓派上 [英] scikit-learn/python3 on raspberry pi

查看:1250
本文介绍了scikit-learn / python3在树莓派上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装 http://scikit-learn.org/stable/index。关于raspbmc的html#。我想用python3。
由于scikit-learn仅支持python3> 3.3,而pi自带3.2,所以我需要构建一切。

因此,我构建了python 3.4,
添加点子来继续其他构建/安装
使用pip构建numpy(scikit-learn依赖项之一)

我被困在构建scipy(一个scikit -learn依赖)
scipy编译失败,gcc被终止,并建议提交gcc错误报告。
我尝试了新的gcc(4.8而不是raspbmc附带的4.6),并得到了相同的错误。



在开始研究gcc和scipy构建脚本之前:
有没有更简单的方法在树莓派上获得scikit-learn / python3?

谢谢!

PS我意识到这不是纯粹的编程问题,但scikit学习网站指向stackoverflow作为一个问题的地方。 安装Raspbian Jessie Lite,并运行这些命令:

  sudo apt-get update $ b $ sudo apt-get upgrade 
sudo apt-get install python3-scipy python3-pip
sudo pip3 install scikit-learn

运行scikit-learn测试:

  sudo pip3安装鼻子
sudo nosetests -v sklearn


I am trying to install http://scikit-learn.org/stable/index.html# on raspbmc. AND I would like to use python3. Since scikit-learn supports only python3 > 3.3, and pi comes with 3.2 I need to build everything.

So I built python 3.4, added pip to proceed with other builds/installs using pip built numpy (one of scikit-learn dependency)

I am stuck on building scipy (one more scikit-learn dependency) scipy build failed with gcc being terminated and suggestion to file gcc bug report. I tried newer gcc (4.8 instead of 4.6 that came with raspbmc) and got the same error.

Before I start digging into gcc and scipy build script: Is there an easier way to get scikit-learn/python3 on raspberry pi?

Thank you!

P.S. I realize this is not purely programming Q, but scikit-learn site points to stackoverflow as a place for questions.

解决方案

Install Raspbian Jessie Lite, and run these commands:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-scipy python3-pip
sudo pip3 install scikit-learn

Run scikit-learn tests:

sudo pip3 install nose
sudo nosetests -v sklearn

这篇关于scikit-learn / python3在树莓派上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆