Keras on Raspberry Pi

1,859 views
Skip to first unread message

vitel...@gmail.com

unread,
May 31, 2016, 4:15:36 AM5/31/16
to Keras-users
I'm trying to install Keras on Raspberry Pi 3 model B whit no success. The OS is Raspbian and python 2.7. I installed Theano with no problem. Should I change OS to Ubuntu Mate or Snappy Ubuntu Core? Any suggestion?

Daπid

unread,
May 31, 2016, 4:19:33 AM5/31/16
to vitel...@gmail.com, Keras-users
On 31 May 2016 at 10:15, <vitel...@gmail.com> wrote:
> I'm trying to install Keras on Raspberry Pi 3 model B whit no success.

How are you doing it? What is your problem?

Matias Valdenegro

unread,
May 31, 2016, 4:28:04 AM5/31/16
to keras...@googlegroups.com
Describing the problem appropriately (including code and/or complete error
messages) is the first step into solving it.

vitel...@gmail.com

unread,
May 31, 2016, 4:58:03 AM5/31/16
to Keras-users, vitel...@gmail.com
I'm not able to install keras with setup.py install execution neither  with pip command. There are no requirements. 

Matias Valdenegro

unread,
May 31, 2016, 5:10:48 AM5/31/16
to keras...@googlegroups.com
On Tuesday, 31 May 2016 01:58:03 BST vitel...@gmail.com wrote:
> I'm not able to install keras with setup.py install execution neither with
> pip command. There are no requirements.

What is the output of those commands? Any error messages? Put them here.

vitel...@gmail.com

unread,
Jun 1, 2016, 3:38:17 AM6/1/16
to Keras-users
Sorry, I was not in the office yesterday. However it was a connection problem. I tried again this morning and no problem occurred. 

kens...@gmail.com

unread,
Sep 29, 2016, 9:49:40 AM9/29/16
to Keras-users, vitel...@gmail.com
You wrote:
"I tried again this morning and no problem occurred.
"
"
 I installed Theano with no problem."


I'm also trying to install Keras on Raspberry Pi 3 model B with no success.
Which step and command did you use to succeed?

I tried:
pip install git+git://github.com/Theano/Theano.git

But that did not worked. If that had worked I would have continued with:
pip install git+git://github.com/fchollet/keras.git

Daπid

unread,
Sep 29, 2016, 9:51:30 AM9/29/16
to kens...@gmail.com, Keras-users, Maria Carmela Vitelli
On 29 September 2016 at 15:49, <kens...@gmail.com> wrote:
>
> I tried:
> pip install git+git://github.com/Theano/Theano.git
>
> But that did not worked.


What happened? What error did you get?

kens...@gmail.com

unread,
Sep 29, 2016, 1:25:29 PM9/29/16
to Keras-users, vitel...@gmail.com
"What happened? What error did you get? "

After command:
pip install git+git://github.com/Theano/Theano.git

I got:
UnicodeDecodeError: 'ascii' codec can't decode byte Oxe2 in position 72: ordinal not in range(128)

Matias Valdenegro

unread,
Sep 29, 2016, 2:46:58 PM9/29/16
to keras...@googlegroups.com

This is not the only message you got, only the last one. You should include the whole output from pip.

kens...@gmail.com

unread,
Sep 29, 2016, 3:01:07 PM9/29/16
to Keras-users, vitel...@gmail.com
"This is not the only message you got, only the last one. You should include the whole output from pip"
 


Matias Valdenegro

unread,
Sep 29, 2016, 3:05:08 PM9/29/16
to keras...@googlegroups.com

On Thursday, 29 September 2016 12:01:07 BST kens...@gmail.com wrote:

> > "This is not the only message you got, only the last one. You should

> > include the whole output from pip"

>

> <https://lh3.googleusercontent.com/-jYcFB9rov1U/V-1k6IaiBCI/AAAAAAAAACU/LN1p

> 59EcAxAmKY2ZeaFUEkWqHs-uySTcwCLcB/s1600/error_message.png>

 

Still the message is cut but you can clearly see that pip is complaining about not finding Python.h. Install it with whatever package manager your distribution uses, likely python-dev on debian/ubuntu systems.

kens...@gmail.com

unread,
Sep 30, 2016, 1:24:30 AM9/30/16
to Keras-users, vitel...@gmail.com
"Still the message is cut but you can clearly see that pip is complaining about not finding Python.h. Install it with whatever package manager your distribution uses, likely python-dev on debian/ubuntu systems."

Many thanks for your support!

I installed python.h from (python-dev).

I then tried install Theano again but it still doesn't work:

 

Daπid

unread,
Sep 30, 2016, 1:30:31 AM9/30/16
to kens...@gmail.com, Keras-users, Maria Carmela Vitelli
The error is telling you that it doesn't have permissions to install numpy, so you are trying to override the system's Python. That is a very bad idea, use a virtualenv instead.

--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/5a6d140f-f138-4c25-989f-68c93b04a595%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

kens...@gmail.com

unread,
Sep 30, 2016, 2:03:05 AM9/30/16
to Keras-users, vitel...@gmail.com
I'm a newbie in Python so I just checked out what "a virtualenv" is.


I now know how to install it:
pip install virtualenv
 

But how will I use it?

I'm not a programmer....

  1. I found that to begin using the virtual environment, it needs to be activated:
$ source venv/bin/activate
Can I just activate it and then start to install Thenao?
>>pip install git+git://github.com/Theano/Theano.git

Then deactivate it when it is done?
  1. If you are done working in the virtual environment for the moment, you can deactivate it:
$ deactivate

Matias Valdenegro

unread,
Sep 30, 2016, 3:25:31 AM9/30/16
to keras...@googlegroups.com

> <https://lh3.googleusercontent.com/-v7f1vgRRvRo/V-32zY2PTjI/AAAAAAAAACs/C9oo

> WQvHwPwQ7cFzaPTwcF465GI0UFkwwCLcB/s1600/20160929_230711.jpg>

 

Just use pip install --user theano, and install all packages with --user

Heinz Hemken

unread,
Sep 30, 2016, 2:06:38 PM9/30/16
to Keras-users, vitel...@gmail.com, kens...@gmail.com
Somewhere a script is using multi-byte characters without declaring the encoding like so:

#!/usr/local/bin/python
# -*- coding: utf-8 -*-
import os, sys
...


Heinz
Reply all
Reply to author
Forward
0 new messages