|
That's not a published item! You are not allowed to see the content of this item!
[ Source ]
python easy install
Created: 2008-02-14 18:01:00
Modified: 2008-11-24 01:02:00 Categories: python programming Keywords: python easy_install Description: This page talk about easy_install. The python way to install python modules. Table Of ContentsIntroduction
Download eggseasy_install -H None -f SomeDir SomePackage Install downloaded eggsAnd then install the eggs manually with: easy_install -zmaxd SomeDir SomePackage Uninstall an eggeasy_install -m SomePackage You want maybe to remove the traces (eggs) leaved on the system in
Where is the stuff installed?For installed python stuff, checkout:
Set up a local python environment with virtual-python.pySee also the docs on my pyguicms-trac
as this use this non-root install for the In this example, i install TurboGears with all his dependencies. wget http://peak.telecommunity.com/dist/virtual-python.py python virtual-python.py And this output: Creating /home/david/lib/python2.4 Creating /home/david/lib/python2.4/site-packages Creating /home/david/include/python2.4 Creating /home/david/bin Copying /usr/bin/python to /home/david/bin You're now ready to download ez_setup.py, and run /home/david/bin/python ez_setup.py Like python-setuptools (easy_install) was already installed, i did not install it twice. export PYTHONPATH=/home/david/lib/python2.4/site-packages Set maybe the PYTHONPATH in the shell startup file. touch /home/david/lib/python2.4/site-packages/easy-install.pth easy_install --install-dir=/home/dvanmosselbeen/lib/python2.4/site-packages \ --script-dir=/home/dvanmosselbeen/bin TurboGears Sometimes you get an error, because it didn't find a mirror or the mirror responded to late. Just run the command again. To install some specific version: Say that you want to get the latest stable version of TurboGears: easy_install --install-dir=/home/dvanmosselbeen/lib/python2.4/site-packages \ --script-dir=/home/dvanmosselbeen/bin "setuptools>=0.6c5" easy_install --install-dir=/home/dvanmosselbeen/lib/python2.4/site-packages \ --script-dir=/home/dvanmosselbeen/bin "TurboGears==1.0.7" To upgrade some package: To get the latest TurboGears version (1.1 beta at this time): easy_install --upgrade --install-dir=/home/dvanmosselbeen/lib/python2.4/site-packages \ --script-dir=/home/dvanmosselbeen/bin TurboGears Note that i had need to install/upgrade setup tools first! Easy install will inform you if needed. Note: sqlobject is not installed, so install it: easy_install --install-dir=/home/david/lib/python2.4/site-packages sqlobject You can now test if everythings is working like expected: /home/david/lib/python2.4/site-packages/tg-admin quickstart tester For more informations see the easy_install docs. Install a new version of setuptoolsWhen i some troubles with Download the latest setuptools from http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c9.tar.gz#md5=3864c01d9c719c8924c455714492295e Extract it:
tar xf setuptools-0.6c9.tar.gz
cd setuptools-0.6c9/
export PYTHONPATH=/home/dvanmosselbeen/lib/python2.4/site-packages
python setup.py install --prefix ~
~/bin/easy_install --install-dir=/home/dvanmosselbeen/lib/python2.4/site-packages \
--script-dir=/home/dvanmosselbeen/bin mysql-python
Set up a local python environment with virtualenvSource from http://pypi.python.org/pypi/virtualenv. For this we plans to use aptitude install python2.5 python2.5-dev Download manually the needed wget http://svn.colorstudy.com/virtualenv/trunk/virtualenv.py cd ~ python2.5 virtualenv.py ENV This output: New python executable in ENV/bin/python2.5 Also creating executable in ENV/bin/python Installing setuptools...........................done. Using this new environmentsource ENV/bin/activate Your prompt should be now If you now enter python in the cli, you will see that it use python version 2.5. Installing some stuff with easy install: easy_install "TurboGears==1.1b1" This automatically install stuff in
Resources
Comments leaved by users (total: 0)
Add a comment[ Toggle on/off history ] Item History:
|
|
||||||||||||||||||||||||||||||||