|
|
#1 |
|
Member
![]() Posts: 14
Karma: 10
Join Date: May 2011
Device: Kindle
|
Installing on RHEL5_i386 Python error
I am trying to install Calibre on a Red Hat 5 server, and I'm getting this error when I paste the supplied sudo python command:
Code:
File "<string>", line 1
import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main()
^
SyntaxError: invalid syntax
Code:
$ sudo python /usr/local/src/calibre.installer.py
File "/usr/local/src/calibre.installer.py", line 3
u = __import__('urllib.request' if py3 else 'urllib', fromlist=1);
^
SyntaxError: invalid syntax
|
|
|
|
|
|
#2 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
Quote:
|
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,597
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The test for python 3 isn't backward compatible with anything before python 2.5, which is half a decade old. Simply download the calibre binary tarball and extract it manually, it will work, provided glibc on your system is >= 2.10
|
|
|
|
|
|
#4 |
|
Member
![]() Posts: 14
Karma: 10
Join Date: May 2011
Device: Kindle
|
OK, thanks for the explanation. The installed Python is 2.4.3 so I'll do it on a more modern server and this one can wait until it gets replaced with something more usable.
|
|
|
|
![]() |
| Tags |
| command, failed, python, rhel5, version |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Python Function Error | LoveMissBubbly | Calibre | 5 | 09-21-2011 04:52 PM |
| Python not installing on Ubuntu | Robotech_Master | Calibre | 1 | 01-05-2011 07:08 AM |
| Help Kovid 7.31 still getting python error | sadievan | Calibre | 10 | 11-28-2010 06:27 PM |
| Python error! | didiyy | Calibre | 6 | 09-24-2010 02:05 AM |
| Installing Python? | luqmaninbmore | PocketBook | 2 | 11-20-2009 01:41 AM |