How do I update a Python package?
-
I'm running Ubuntu 9:10 and a package called M2Crypto is installed (version is 0.19.1). I need to download, build and install the latest version of the M2Crypto package (0.20.2). The 0.19.1 package has files in a number of locations including (/usr/share/pyshared and /usr/lib/pymodules.python2.6). How can I completely uninstall version 0.19.1 from my system before installing 0.20.2?
-
Answer:
You might want to look into a Python package manager like pip (http://pip.openplans.org/). If you don't want to use a Python package manager, you should be able to download M2Crypto and build/compile/install over the old installation.
thompson at Stack Overflow Visit the source
Other answers
How was the package originally installed? If it was via apt, you could just be able to do apt-get remove python-m2crypto If you installed it via easy_install, I'm pretty sure the only way is to just trash the files under lib, shared, etc.. My recommendation in the future? Use something like http://pip.openplans.org/ to install your packages. Furthermore, you could look up into something called http://pip.openplans.org/ so your packages are stored on a per-environment basis, rather than solely on root. With pip, it's pretty easy: pip install m2crypto But you can also install from git, svn, etc repos with the right address. This is all explained in the http://pip.openplans.org/
Bartek
Related Q & A:
- How do I update only a specific svn external on first update?Best solution by stackoverflow.com
- How do I make a python web program that is on a ubuntu server allow access to the server?Best solution by Yahoo! Answers
- How do I compile my Python program to a .jar with Jython?Best solution by Stack Overflow
- How can I ship a big package to Mexico?Best solution by Yahoo! Answers
- How can I install a new firmware or update to my PSP?Best solution by wikihow.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.