How do I upgrade packages used by iPython?

17,782

Solution 1

The ipython command invokes the respective python script, which is typically stored at /usr/local/bin/ipython. The first line of this script denotes the python version to be used. In my case it is #!/usr/bin/python3.6 which means that ipython is using version 3.6 of python. Use the command which ipython | xargs head -n 1 to read this first line of your ipython script. Once you know which python version ipython is using you can invoke the upgrade command. In my case, I have to execute pip3.6 install --upgrade ipython and pip3.6 install --upgrade pandas.

Solution 2

Using the following command you can update ipython, Open cmd and type the command:

pip install ipython --upgrade
Share:
17,782
Richard
Author by

Richard

Updated on July 20, 2022

Comments

  • Richard
    Richard almost 2 years

    I am using iPython on OSX (on system, not inside a virtualenv) and importing pandas into a notebook. My system python is Python 2.

    The version of pandas visible in the notebook is 0.16.2:

    import pandas as pd
    print pd.__version__
    

    I want to use pandas 0.18. So I have quit the notebook and run:

    pip install --upgrade ipython
    pip install --upgrade pandas
    

    This appeared to install ipython 4.1.2 and pandas 0.18.0, but if I run:

    ipython --version
    

    I see v4.0. And running my notebook still shows pandas 0.16.2.

    How do I upgrade my packages so that I can use pandas 0.18 inside my notebook?

  • Pradyumna TK
    Pradyumna TK about 3 years
    Hie @jboockmann, It works for me as well...but with small correction.. Instead of 'pip3.6 install' , i had to give only 'pip install'