0

The hell began when when we tried to go to Arduino Yún's linino environment.

Initially we used this code:

import imaplib
import email
mail = imaplib.IMAP4_SSL('imap.gmail.com')
mail.login('user@example.com', 'password')
mail.list()

And eventually we got:

arduino object has no attribute 'IMAP4_SSL'

After some research we tried importing del ssl library:

import imaplib
import email
import ssl
mail = imaplib.IMAP4_SSL('imap.gmail.com')
mail.login('user@example.com', 'password')
mail.list()

But in this occasion we got this:

Traceback (most recent call last):
  File "mail-processor.py", line 3, in <module>
  import ssl
File "/usr/lib/python2.7/ssl.py", line 60, in <module>
  import _ssl # if we can't import it, let the error propagate
ImportError: No module named _ssl

Well, any idea about this?

Thanks in advance

Francesc
  • 1
  • 2

1 Answers1

0

[SOLVED] My friend and colleague @marcelofpalves have find out the solution: Installing the python-openssl library. Now all works like a charm. Thanks Marcelo.

From bash:

opkg update
opkg install distribute
opkg install python-openssl

For more information visit: http://playground.arduino.cc/Hardware/Yun#installing_python_module

Francesc
  • 1
  • 2