Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to downgrade IPython4 to 3 using Anaconda

I'm currently using IPython version 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]: 

How can I downgrade it to version 3 (less than 4)?

like image 726
neversaint Avatar asked Oct 27 '15 09:10

neversaint


1 Answers

By using conda remove1 and conda install.

conda remove will remove the current version of ipython:

conda remove ipython 

You can then optionally search for versions of ipython that you want to install with conda search ipython:

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 

With the starred entry denoting the current version you have.

Then, use conda install ipython=version_num to install the version you want. Look out for default Python versions required by each ipython version though!


1 As I recently noticed, the conda remove step is obsolete. You can simply list the python versions with conda search and then execute conda install with the version you want, anaconda takes care of the replacement for you:

(myenv)jim@unx: 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

And you're good to go.

like image 87
Dimitris Fasarakis Hilliard Avatar answered Oct 02 '22 01:10

Dimitris Fasarakis Hilliard