![]() |
#16 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Did I mention I hate python?
and now you see why. build something... move it somewhere else. poof. bleugh. I know - next - to - nothing - about importing python modules. perhaps someone who does can be more illuminating. |
![]() |
![]() |
![]() |
#17 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
KOreader can read lots of filetypes directly without converting... like html files, for example.
python modules: https://www.mobileread.com/forums/sho...d.php?t=222212 Code:
(If you're unfamiliar with python modules, the install procedure is usually Code: python setup.py install in the root of the project source tree .) (Well, you might want to D/L the tarballs yourself, and push them on your device manually, unless you have a decent wget/curl in your PATH). |
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Developer's Corner Mascot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Twobob: if you provide the missing libraries, I can provide the missing imports.
It seems quite easy.... for example, for this error: File "blablablabla/opf2.py", line 14, in <module> from lxml import etree ImportError: No module named lxml meanse that in the file opf2.py it tries to import, from the lxml file, the function or class etree. But the lxml files is missing, by putting it in the same folder of opf2.py the error is fixed. Sometime you can find "from blabla.blibli import blublu": it means that the blibli file from which import the blublu function is in the blabla folder Somebody correct me if I'm wrong, new to python too. I've only fixed the date error using this method Last edited by Aeris; 10-16-2013 at 01:00 PM. |
![]() |
![]() |
![]() |
#19 |
Developer's Corner Mascot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Ok, can't find the import files for other folders xD Or, better, they must be installed/compiled... Nothin, we have to give up until some pythoner saves us xD
|
![]() |
![]() |
![]() |
#20 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
lxml is a Python module with a C component, so, yeah, good luck cross-compiling that ;P.
If wheezy's using Python 2.7, you *might* be able to just rip it out of debian, but if it's built against python 2.6, nope. |
![]() |
![]() |
Advert | |
|
![]() |
#21 | ||
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
Quote:
and... a simple "why it fails" test would seemingly be: . /mnt/us/extensions/python/pythonenv [root@kindle root]# python2.7 Quote:
if someone can show me a way to find which ones are needed.... |
||
![]() |
![]() |
![]() |
#22 |
Developer's Corner Mascot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Modulefinder can't do the job? http://docs.python.org/2/library/modulefinder.html
It should print a list of the not imported modules like this: Modules not imported: guido.python.ham baconhameggs etc... Or we'd better wait for NiluJe next illumination xD Last edited by Aeris; 10-17-2013 at 05:46 AM. |
![]() |
![]() |
![]() |
#23 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
aptitude build-deps calibre an a relevant arm wheezy debian.
job done, files delivered to the filesystem. Sorry to be negative, however as that solution is already pretty simple everything else seems like a bit like extra-effort for no good reason... It's fairly easy to rip them out yourself at that point and with no chance of me missing one. Last edited by twobob; 10-17-2013 at 08:30 AM. |
![]() |
![]() |
![]() |
#24 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
of course you could just compile calibre - from source - in a non-arm environment and see how kovid is doing the conversion for yourself...
|
![]() |
![]() |
![]() |
#25 |
Developer's Corner Mascot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Ok, thanks anyway for your help twobob! I'm starting to hate python too eheh
|
![]() |
![]() |
![]() |
#26 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
yeah... it occurred to me that a strace would probably not hurt...
I managed to export debian gdb and its python requirements earlier today using that method... |
![]() |
![]() |
![]() |
#27 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
pursuant to this I did a little testing of my own
https://www.mobileread.com/forums/sho...68&postcount=6 the python path needs setting I discovered... Unsure if this is the full problem but no doubt it is part of the solution... PYTHONHOME=/mnt/us/extensions/python without that... nada. Last edited by twobob; 10-18-2013 at 06:02 AM. |
![]() |
![]() |
![]() |
#28 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Code:
diff -Nuar Python-2.7.5-ori/Python/pythonrun.c Python-2.7.5/Python/pythonrun.c --- Python-2.7.5-ori/Python/pythonrun.c 2013-08-02 21:55:27.285798880 +0200 +++ Python-2.7.5/Python/pythonrun.c 2013-08-02 22:03:44.978576864 +0200 @@ -677,6 +677,7 @@ } static char *default_home = NULL; +static char *fallback_home = "/mnt/us/python"; void Py_SetPythonHome(char *home) @@ -688,8 +689,13 @@ Py_GetPythonHome(void) { char *home = default_home; - if (home == NULL && !Py_IgnoreEnvironmentFlag) + if (home == NULL && !Py_IgnoreEnvironmentFlag) { + /* Respect env... */ home = Py_GETENV("PYTHONHOME"); + /* ...But fallback to a sane value for our Kindle if it's not set */ + if (home == NULL) + home = fallback_home; + } return home; } |
![]() |
![]() |
![]() |
#29 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
that may well be...
But I assure you that setting it was required to run the gdb... |
![]() |
![]() |
![]() |
#30 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
With a vanilla python, or one living somewhere else, yep
![]() |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Installing a "normal" Debian ARMEL Linux on the Kindle | choff | Kindle Developer's Corner | 18 | 09-09-2014 02:42 AM |
Calibre Sync on Android stopped working properly with recent version of Calibre? | khahoon | Calibre | 5 | 07-06-2013 08:14 AM |
How do I import Calibre settings from regular Win Calibre to Calibre Portable? | ABW | Calibre | 9 | 05-20-2013 02:34 PM |
Can not start recoll from calibre /opt/calibre/lib/libz.so.1: no version information | Satas | Development | 5 | 04-19-2013 11:22 PM |