Pylepton with Python3

1,129 views
Skip to first unread message

Brian Dinh

unread,
Aug 13, 2020, 1:26:07 AM8/13/20
to Flir Lepton
Hi,

I successfully installed both Lepton Module and pylepton and run my own script with python2. But when I run it with python 3. It gave me the error: No module named 'Lepton'.

Does anyone know how to solve this?

Thanks

Andrew Jones

unread,
Aug 13, 2020, 3:57:22 AM8/13/20
to Brian Dinh, Flir Lepton
When you say you "installed" it, how did you "install" in for Python 2?

You probably just need to follow the same steps but make sure you're
installing it to your Python 3 package directory.
> --
> You received this message because you are subscribed to the Google Groups "Flir Lepton" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to flir-lepton...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/flir-lepton/d419bdb6-6122-4443-b7cb-04661bffdb3co%40googlegroups.com.

Brian Dinh

unread,
Aug 13, 2020, 4:17:27 AM8/13/20
to Flir Lepton
Hi,

I followed the steps by Sparkfun to install LeptonModule https://learn.sparkfun.com/tutorials/flir-lepton-hookup-guide/all and then followed the pylepton github https://github.com/groupgets/pylepton. I later tried 'sudo python3 setup.py install'.

When attempting to fix the error 'No module named Lepton'. I followed this guide: https://stackoverflow.com/questions/44801661/init-py-does-not-find-modules-in-same-directory to change the import in __init__

Now I got the error: File or stream is not seekable.
Can you tell me which steps I need to change during the install to make it run on python3?

On Thursday, August 13, 2020 at 5:27:22 PM UTC+9:30, Andrew Jones wrote:
When you say you "installed" it, how did you "install" in for Python 2?

You probably just need to follow the same steps but make sure you're
installing it to your Python 3 package directory.

On Thu, Aug 13, 2020 at 6:26 AM Brian Dinh <briand...@gmail.com> wrote:
>
> Hi,
>
> I successfully installed both Lepton Module and pylepton and run my own script with python2. But when I run it with python 3. It gave me the error: No module named 'Lepton'.
>
> Does anyone know how to solve this?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups "Flir Lepton" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to flir-...@googlegroups.com.

Brian Dinh

unread,
Aug 14, 2020, 6:14:54 AM8/14/20
to Flir Lepton
[SOLVED]

Looking at the github https://github.com/groupgets/pylepton. The master branch was updated for python3 but only for Lepton2. The branch Lepton3-dev seems like it was created to run Lepton3 with python3 but got the error in the file Lepton3.py

Change line 8 and 11 in Lepton3.py by adding a "." and include bracket "()" in all the print statements should fix the problem
ln 8: from ioctl_numbers import _IOR, _IOW
--> from .ioctl_numbers import _IOR, _IOW
ln 11: from Lepton import Lepton
--> from .Lepton import Lepton
Reply all
Reply to author
Forward
0 new messages