0

I've been experimenting with an Amazon Ubuntu instance running 14.04 and am using python3-pandas package, which for this release is version 0.13.1, which is quite a ways behind the current version of 0.16.2. My question is how can I get a more recent version -- ideally using, 1) a package manager that figures out other dependencies and 2) using binary packages so I don't have to compile from source?

When I look at packages.ubuntu.com I see some of the proposed python3-pandas versions for future Ubuntu releases. For example wily uses 0.15.0 and I can get to source packages at this site.

I have also stumbled on binary packages at launchpad.net.

Here's what I've tried so far:

  1. I can download the .deb files from launchpad.net mentioned above and then try installing with dpkg -i. This fails as expected because of missing dependencies. I could probably find those, download, and install as well, but seems like there should be a better way.
  2. The pandas site, gives the instructions sudo add-apt-repository ppa:pythonxy/pythonxy-devel && sudo apt-get update, followed by sudo apt-get install python-pandas, but this doesn't seem to work. Kind of looks like the pythonxy ppa doesn't have a python3 version of pandas?

It seems like what I need to do is tell apt-get about the package repository that appears to exist at launchpad.net. But I can't seem to figure out how to do that.

1

I have run into a similar problem before. There are two possible solutions:

Use pip

pip is a package manager for python. With pip${version} you can install packages for a specific python version.
General info about pip
Installing pip (basically sudo apt-get install pip)

There are also ways to install the packages for all users (as root), or only locally.

Backporting

If you need a .deb package, for whatever reasons (for example if other users want to download your product from the repository with all dependencies in the repo), you can "backport" the packages from Wily. That means building the (source) package with all its dependencies and putting them in a PPA/requesting backport to Trusty (backports package source).

Using backports and requesting/making them

I did the latter one a few days ago for the package python-cryptography. You will need a launchpad.net account and you will need a GPG key. There you have to create a PPA (for example "python-pandas-backport"). Then just follow the second link. I did a requestbackport -d trusty <package> and then you get a text file where you have the command for backportpackage.

You enter the backportpackage command in another window. It's mostly pretty straight forward. Then you can check your PPA on launchpad to see why/if the build has failed. That's how I found the dependencies, and for all those packages I repeated the process above (with the same PPA, mind you). If you know the deps, you can just backport them first.

You can then use the packages from your own PPA and anyone else can too. If you have requested a backport, they might land in Trusty. But that may take a while (Wily will be released in a month, so it's crunch time).

  • Great suggestion using pip. I used it in windows to good success. I was able to get to pandas 0.16.2 using that approach -- although it doesn't get away from compiling from source. – EpicAdv Aug 28 '15 at 15:38
  • Right, I guess that might be an issue for some of the scientific python packages (so I've heard). Then maybe the second option. Although it looks like python-pandas has a lot of dependencies. – Benjamin Maurer Aug 28 '15 at 16:07

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.