Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-12-2011, 01:33 PM   #1
Thomas Bates
OpenAlias Meta
Thomas Bates began at the beginning.
 
Thomas Bates's Avatar
 
Posts: 2
Karma: 10
Join Date: Jan 2011
Location: Illinois
Device: Kindle 3
Getting Calibre to work in ArchLinux

Hello there everyone, I'm hoping to be mildly helpful for my first post. First, let me explain why I'm putting Calibre on Linux.
I keep a fairly tight knit morning routine, get up, mount the Kindle, transfer my Calibre news (which happens as I shower), drive to school, eat a blueberry muffin while reading up on current events until the first bell rang. Lately however, I've been having issues with my netbook (which runs Ubuntu, and is my alarm clock/Kindle-Calibre Source) connecting to wifi. So, I decided to put Calibre on my desktop which runs the latest ArchLinux.

ArchLinux is where the problem started. When Python 3 came out, Arch gave everything referring to "python" to python 3. Such as:
Code:
#! /usr/bin/env python
That line of code tops off every python script in the Calibre program. And since Calibre is written mostly/completely in Python, that became a problem quickly.
Python 3 destroyed many standards which occurred in Python 2, and thus attempting to run Calibre in an (up to date) ArchLinux machine, will fail. However, #calibre on irc.freenode.net (specifically allbery_b) found a fix.

So, here's the guide on how to install Calibre on ArchLinux. For this guide we'll be using the Source install, not the binary.

The first thing you need to do is open up the terminal and enter this:
Code:
wget -O- http://status.calibre-ebook.com/dist/src | tar xvz 
cd calibre*
This retrieves the code, extracts the folders, and changes directory to the ~/calibre/ directory.

Next is the part that changes "#! /usr/bin/env python" "#! /usr/bin/env python2"
Code:
find . -type f -exec sed -i 's,\(#!/usr/bin/env python\)2*,\12,' '{}' ';'
This should add/change the "python" part to "python2," removing the problem.

This: grep '#!' setup/install.py should produce two lines both referencing python2. If that is correct, you're almost in the clear.

Next, you'll run the install script:
Code:
sudo python2 setup.py install
You HAVE to have the "2" otherwise it will not work.

Side-note: I had to perform the install script twice, as the first run it would stop at the GUI bit, the second run will clear things completely and without error.

At this point, you should be able to just type in "calibre" and run the program.


If anyone can't get this working, or if someone spots an error in the code, it is most definitely my fault, so please let me know so I can correct it. Thanks!
Thomas Bates is offline   Reply With Quote
Old 01-12-2011, 02:08 PM   #2
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
I believe calibre is in AUR. Has this been communicated to the PKGBUILD maintainer so it can be incorporated in it?
user_none is offline   Reply With Quote
Advert
Old 01-12-2011, 08:38 PM   #3
Thomas Bates
OpenAlias Meta
Thomas Bates began at the beginning.
 
Thomas Bates's Avatar
 
Posts: 2
Karma: 10
Join Date: Jan 2011
Location: Illinois
Device: Kindle 3
No, I'll notify him today. Thanks!
Thomas Bates is offline   Reply With Quote
Old 07-19-2011, 05:16 PM   #4
Shirlz
Junior Member
Shirlz began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2011
Device: none
Thank you for this guide on how to install Calibre on ArchLinux. I have been having this issue as well, and have found this guide to be very helpful. I am not real tech savvy, so this was really a godsend for me. I really appreciate this. I am wondering if anyone has any experience with iphone app design? If you have, I have some questions for you. Thanks.

Last edited by Shirlz; 08-04-2011 at 06:58 PM.
Shirlz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre can't work with prior Calibre library. PassedPawn Calibre 4 12-03-2010 07:15 AM
Calibre is making me work! Sydney's Mom Calibre 5 08-06-2010 09:25 AM
calibre doesn't start in Archlinux 64 Celeblin Calibre 0 07-08-2009 04:58 PM
Does Calibre work with the DX? skellng Calibre 3 06-15-2009 01:43 PM
trying to get Calibre to work grimo1re Calibre 2 05-26-2009 05:56 PM


All times are GMT -4. The time now is 10:03 PM.


MobileRead.com is a privately owned, operated and funded community.