2015-10-27 256 views
6

降級IPython4 3我目前使用IPython的版本4如何使用蟒蛇

$ ipython 
WARNING: 'inline' not available as pylab backend, using 'auto' instead. 
Python 2.7.10 |Anaconda 2.1.0 (x86_64)| (default, Oct 19 2015, 18:31:17) 
Type "copyright", "credits" or "license" for more information. 

IPython 4.0.0 -- An enhanced Interactive Python. 
?   -> Introduction and overview of IPython's features. 
%quickref -> Quick reference. 
help  -> Python's own help system. 
object? -> Details about 'object', use 'object??' for extra details. 
Using matplotlib backend: MacOSX 

In [1]: 

我怎樣才降級到版本3(小於4)?

回答

1

試着這麼做:

sudo /opt/anaconda/bin/pip install -I ipython==3.2.2 

-I意味着忽視安裝的版本=>重新安裝。

6

通過使用conda removeconda install

conda remove將刪除的ipython當前版本:

conda remove ipython 

然後,您可以選擇搜索要安裝帶有conda search ipythonipython版本:

ipython      0.13      py27_0 defaults   
          0.13      py26_0 defaults   
          0.13      py33_1 defaults   
          0.13      py27_1 defaults   
          0.13      py26_1 defaults   
          0.13.1     py33_1 defaults 
... continues.. 
          3.2.0     py27_0 defaults   
          3.2.1     py34_0 defaults   
          3.2.1     py33_0 defaults   
          3.2.1     py27_0 defaults   
          4.0.0     py35_0 defaults   
          4.0.0     py34_0 defaults   
          * 4.0.0     py27_0 defaults 

隨着星號的條目表示的目前的版本,你有。

然後,使用conda install ipython=version_num來安裝所需的版本。注意每個ipython版本所需的默認Python版本!


正如我最近注意到,該conda remove步驟是過時的。你可以簡單地列出了Python版本,conda search,然後用你想要的版本執行conda install,蟒蛇照顧更換爲您提供:

(myenv)[email protected]: conda install ipython=3.2.0 
Fetching package metadata: .... 
Solving package specifications: ................ 

The following packages will be DOWNGRADED: 

    ipython: 4.0.1-py27_0 --> 3.2.0-py27_0 

Proceed ([y]/n)? y 

,你是好去。

+0

這可能會導致卸載其他軟件包。 –

4

降級在Anaconda是非常容易的。有些答案指出了正確的答案,但有不必要的步驟。即使已安裝,您也可以指定版本,Anaconda將處理Anaconda軟件包的依賴關係。

conda install ipython=3 

這將降級IPython的和相關的軟件包,這樣他們將與指定版本的工作,如果需要的話。