[NZLUG] Python upgrade issues
skyclan at gmx.net
Wed Mar 30 22:41:12 NZDT 2016
On Tue, 2016-03-29 at 06:24 +0800, jsr at ecofluidics.com wrote:
> 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.
> John Reid
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
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.
More information about the NZLUG