0

I am trying to install the latest version of package xxxx. I downloaded, unarchived and follow the readme: python setup-py install But python does not see my latest version. It seems that there is a python-xxxx package already installed (older version of xxxx) and python uses that I think. How do I remove this conflict? Can I just apt-get remove python-xxxx? But would that cause dependencies problem? (Arrgh, I am spending more time on installation issues than getting actual work done...)

0

1 Answer 1

1

If you're developing things*, I strongly recommend using virtualenv to create an entirely separate package environment for your development. This allows you to install anything without conflicting with the system... And perhaps more importantly, means the system updates won't conflict with your development (something I have lost hair to in the past).

If you have an installed program that depends on a newer version of a Python library, that's a bit tougher.

  • You could remove the python-xxxx package from Apt and install with sudo pip, but that might cause dependency issues with apt.

  • You could leave the packaged version and just install-over with sudo pip. This is dirty in so many ways but can occasionally work. I still wouldn't recommend it.

  • Or you could properly package up the newer version of the library into a deb and install it. I've just found a super-quick way of doing this, so I'll go over that now.

As I mentioned in the third bullet, packaging python packages is pretty simple once you know how. I'm going to suggest using stdeb. Once installed it makes the whole thing as simple as sudo pypi-install xxxx but there is immediately an issue: The current repository version is bugged and won't work. A newer version works though, and no, the irony is not lost on me.

You need to enable the Proposed repos (look in Software Sources under updates), then sudo apt-get update and finally sudo apt-get install python-stdeb.

Once you have done that, you can simply call:

sudo pypi-install xxxx

And stdeb will generate a python-xxxx package with all the right version information and install it.

* things not intended to be released to the wider Ubuntu community, where using pre-packaged dependencies is desirable.

1
  • thanks, in Best Practices for Ubuntu Newbies wiki this should be, if there is any....(sorely miss those copy-directory-and-click-exe-to-run-program days)
    – ng0323
    Aug 20, 2014 at 8:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .