2012-10-11 59 views
-1

我試圖在我的rhel 5.8服務器上安裝ipython,但是它給出了下面的錯誤。無法在rhel 5.8上使用pip安裝ipython

└──> sudo pip install ipython 
[sudo] password for ronak: 
Downloading/unpacking ipython 
    Downloading ipython-0.13.tar.gz (6.1Mb): 6.1Mb downloaded 
    Running setup.py egg_info for package ipython 
    Traceback (most recent call last): 
     File "<string>", line 14, in ? 
     File "/usr/local/home/ronak/build/ipython/setup.py", line 23 
     from __future__ import print_function 
    SyntaxError: future feature print_function is not defined 
    Complete output from command python setup.py egg_info: 
    Traceback (most recent call last): 

    File "<string>", line 14, in ? 

    File "/usr/local/home/ronak/build/ipython/setup.py", line 23 

    from __future__ import print_function 

SyntaxError: future feature print_function is not defined 

---------------------------------------- 
Command python setup.py egg_info failed with error code 1 
Storing complete log in /home/ronak/.pip/pip.log 

回答

0

IPython≥0.11要求Python≥2.6。那個錯誤表明你有Python 2.5。

如果必須使用Python 2.5,你可以這樣做:

pip install ipython==0.10.2 

它是支持Python 2.5的最後一個版本。

+0

如果我有python 2.4會怎麼樣? – ronak

+0

我認爲0.10.2 *應該可以在2.4上工作,但是自從Python2.4的最後一個真正的版本在2006年以來,它是相當未經測試的,並且沒有得到官方的支持。 – minrk