LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Trying to install 'Gmail Backup' but it requires python2.5 - I have python2.8... (https://www.linuxquestions.org/questions/slackware-14/trying-to-install-gmail-backup-but-it-requires-python2-5-i-have-python2-8-a-879685/)

Robert.Thompson 05-09-2011 12:38 PM

Trying to install 'Gmail Backup' but it requires python2.5 - I have python2.8...
 
Hello:

When I run the install of 'Gmail Backup' (from http://www.gmail-backup.com/download) an error msg appears stating that I must have python2.5 - I presently have python2.8

Is there any way to solve this without destroying my Slackware 13.37 installation?

Thanks,

audriusk 05-09-2011 01:21 PM

Quote:

Originally Posted by Robert.Thompson (Post 4351186)
When I run the install of 'Gmail Backup' (from http://www.gmail-backup.com/download) an error msg appears stating that I must have python2.5 - I presently have python2.8

Is there any way to solve this without destroying my Slackware 13.37 installation?

The zip archive from provided URL contains only optimized bytecode (.pyo) files for Python 2.5, so not much you can do about it, unless there are source files (.py) hidden somewhere (svc package from archive doesn't look like it). Try asking upstream for newer version, though the whole thing seems to be abandoned.

And I guess you meant python2.6, not 8? :)

Chuck56 05-09-2011 01:31 PM

What if he edits the gmail-backup.sh and gmail-backup-gui.sh files to from "exec python2.5" to "exec python" and tries again?

audriusk 05-09-2011 01:35 PM

An idea just popped in my head -- if all you want is to backup your Gmail mailbox, you could try offlineimap tool to fetch it via IMAP. I haven't tried offlineimap myself, but it should work.

audriusk 05-09-2011 01:37 PM

Quote:

Originally Posted by Chuck56 (Post 4351236)
What if he edits the gmail-backup.sh and gmail-backup-gui.sh files to from "exec python2.5" to "exec python" and tries again?

Unfortunately, it won't work, as bytecode differs between Python versions:

Code:

$ python2.6 gmail-backup-gui.pyo
RuntimeError: Bad magic number in .pyc file


bgeddy 05-09-2011 01:39 PM

Quote:

What if he edits the gmail-backup.sh and gmail-backup-gui.sh files to from "exec python2.5" to "exec python" and tries again?
This won't work as the .pyo files included will only work with python-2.5 - they have a "magic number" to show what version of python they work with.

I looked a this and noticed the bytecode .pyo files as audriusk mentions. This is a pain as it means you need python 2.5. If you are stuck you could try getting the python source from Slackware 12.2, fixing the python.Slackbuild so it doesn't overwrite the existing python you have then build and install the package. This should then enable to you run these gmail python scripts.
Quote:

Try asking upstream for newer version, though the whole thing seems to be abandoned.
Again, as audriusk mentions, the versions of python involved are now rather old and so I don't know whether it's worth trying to get this running. At any rate you definitely need to keep your existing python version as a lot of applications rely on this.

Edit : Apologies audriusk - we where typing these at the same time!

Robert.Thompson 05-10-2011 08:23 AM

Thanks to all who replied!

I think that I'll just forget 'Gmail Backup'.

Marking as SOLVED.


All times are GMT -5. The time now is 04:51 PM.