Ubuntu Aptget Python stuff
Posted under » Ubuntu » Python on 08 December 2009
To list the version of Python you are having
python -V
To install an old version
apt-get install python2.4
python2.4 and python2.5 will happily coexist. Python2.5 puts its libraries in /usr/lib/python2.5 while python2.4 puts them in /usr/lib/python2.4 and so forth. /usr/bin/python will typically be a symlink to the latest version of python (/usr/bin/python2.5), and you can specifically use version 2.4 by running /usr/bin/python2.4.
Installing modules
The manual mode. Sometimes, the command look like this.
python setup.py install
python egg
In some cases, you can instal stuff by the python egg. Which is basically a shell script ie you have to chmod it to 755 prior to execution.
In Ubuntu if you want the latest version you may install it by Apt-get
apt-get install python-cherrypy3 apt-get install python-mako (will install sqlalchemy as well) apt-get install python-biopython apt-get install python-setuptools (for easy_install)
Latest Versions
- Python 2.6.2
- CherryPy-3.0.2
- python-mako (0.2.2-1)
- python-sqlalchemy (0.4.8-1)
If you install stuff, location is.
- /usr/share/python-support
- - python-biopython
- - python-cherrypy3
- - python-openssl
- - python-sqlalchemy
- Mako /usr/lib/python2.6/dist-packages/mako
To uninstall
apt-get remove --purge python-mako
To renstall
apt-get --reinstall install python-mako
python2.4 and python2.5 will happily coexist. Python2.5 puts its libraries in /usr/lib/python2.5 while python2.4 puts them in /usr/lib/python2.4 and so forth. /usr/bin/python will typically be a symlink to the latest version of python (/usr/bin/python2.5), and you can specifically use version 2.4 by running /usr/bin/python2.4.
Sometimes you can't uninstall a module while you are on a different version of Python at the time of uninstall while corrupting the module in the process. When this happens, you need to
- revert to the Python version where the module is installed and then reinstall the module.
- uninstall it
