[NZLUG] Python upgrade issues

jsr at ecofluidics.com jsr at ecofluidics.com
Thu Mar 31 18:11:27 NZDT 2016

Hi Carlos

Many thanks for your reply. Obviously upgrading python is fraught with peril! I shall try Virtualenv as you suggest.

The "Fix broken packages" message was generated by a Mint package management GUI called "synaptic" with which I have had issues previously. I prefer to use apt-get or aptitude when I have sufficient information.

Why should it be so difficult to update / upgrade Python and its modules? I presume it is related to its cross-platform character.

Once again, thanks.


----- Original Message -----
From: "Carlos Hendson" <skyclan at gmx.net>
To: nzlug at lists.nzoss.org.nz
Sent: Wednesday, 30 March, 2016 8:41:12 PM GMT +10:00 Canberra / Melbourne / Sydney
Subject: Re: [NZLUG] Python upgrade issues

On Tue, 2016-03-29 at 06:24 +0800, jsr at ecofluidics.com wrote:
> Hi
> I am having some issues with Python. Everything worked fine until I
> started using statsmodels. Python recognizes the function calls but
> that is about all. There is something seriously wrong somewhere.
> So I decided to upgrade statsmodels. Synaptic reports "Could not
> apply changes! Fix broken packages first." Synaptic couldn't handle
> fixing broken packages and popped a list of weird errors so I ran
> "aptitude install -f" etc from the command line. Still no joy.
> I have Python 2.7.5 installed. (Also Python3 as 3.3.2 but Python 3
> cannot even find numpy.)
> When I search the forums for advice on how to upgrade Python there
> are numerous parallel methods recommended: easy_install, pip, wget
> methods etc. etc. I am cautious about committing to any of these
> until I am sure it works because I don't want to wreck my existing
> intallation. I am also increasingly suspicious of Synaptic.
> All I really want to do is install a working version of statsmodels.
> I have version 0.4.2 installed which doesn't work. I believe 0.6.1 is
> available but I don't know how to install it.
> Thanks
> John Reid

Hi John,

What distribution and version are you using?

What command caused the output of Fix broken packages?

I'm going to throw this out there without the full background:  If you
follow the advice on the forums and use wget/easy_install/pip and co.,
you'll be circumnavigating your distribution's package management
system and ultimately risk a lot of pain if there are python module
version collisions.

If statsmodel 0.6.1 is an *absolute* must on your system and it's not
available for your distribution and you're going to install it without
official packages, I recommend you use Python's virtualenv.


Virtualenv will allow you to install the latest version of statsmodel
in an isolated directory which will avoid collisions with system wide

If you wanted to take the isolation idea even further, then you could
consider a container (like LXC or Docker) to install and run the
application but in your case it's probably over kill and over

I hope that helps.

NZLUG mailing list
NZLUG at lists.nzoss.org.nz

More information about the NZLUG mailing list