Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python pandas stuck at version 0.7.0

Tags:

python

pandas

First off, I'm a novice... I'm a newbie to Python, pandas, and Linux.

I'm getting some errors when trying to populate a DataFrame (sql.read_frame() gives an exception when trying to read from my MySQL DB, but I am able to execute and fetch a query / stored proc). I noticed that pandas is at version 0.7.0, and running "sudo apt-get install python-pandas" just says that it's up to date (no errors): "... python-pandas is already the newest version. 0 upgraded..."

Based on some other posts I found on the web, I think my DataFrame problem may be due to the older version of pandas (something about a pandas bug involving tuples of tuples?). Why won't pandas update to a more current version?

Setup:

Ubuntu: 12.04.2 LTS Desktop (virtual workstation on VMWare)
sudo apt-get update, sudo apt-get upgrade, and sudo apt-get dist-upgrade all current
Python: 2.7.3 (default, April 10 2013, 06:20:15) /n [GCC 4.6.3] on Linux2
$ "which python" only show a single instance: /usr/bin/python
pandas.__version__ = 0.7.0
numpy.__version__ = 1.6.1

I tried installing Anaconda previously, but that turned into a big nightmare, with conflicting versions of Python. I finally rolled back to previous VM snapshot and started over, installing all of the MySQL, pandas, and iPython using apt-get on the individual packages.

I'm not having any other problems on this workstation... apt-get seems to be working fine in general, and all other apps (MySQL Workbench, Kettle / spoon, etc.) are all working properly and up to date.

Any ideas why Python pandas won't upgrade to 0.11.0? Thank you.

like image 966
James Haskell Avatar asked Jul 20 '13 05:07

James Haskell


People also ask

Does Python 3.10 support pandas?

Python version supportOfficially Python 3.8, 3.9 and 3.10.

Does Python 3.6 support pandas?

Installing with ActivePythonVersions 2.7, 3.5 and 3.6 include pandas.


2 Answers

"pip install --upgrade pandas" did not work for me on a fresh Ubuntu: 12.04.2 LTS Desktop instance. Within Python, pandas was still showing version 0.7.0.

Instead, I was able to get the update through by using easy install:

sudo easy_install -U pandas
like image 33
user3062149 Avatar answered Oct 02 '22 06:10

user3062149


As nitin points out, you can simply upgrade pandas using pip:

pip install --upgrade pandas

Since this version of pandas will be installed in site-packages you will, in fact, be at the mercy of any automatic updates to packages within that directory. It's wise to install the versions of packages you want into a virtual environment so you have a consistent working environment with the bonus of reproducibility.

To answer your last question, the reason Pandas won't "upgrade" to 0.11.0 using apt-get update is that packages (of Pandas) from your distribution lag behind or haven't been created yet.

like image 170
Kyle Kelley Avatar answered Oct 02 '22 05:10

Kyle Kelley