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!