← Back to team overview

caneypuggies team mailing list archive

Fixing setuptools error

 

Hi Stacy,

The Ubuntu "python-setuptools" package contains the easy_install
command.  In earlier revisions of CaneyPUGgies_env_setup.sh, I got the
same setuptools error you saw last night.  The basic problem is that
TurboGears 2.1 requires a particular version of setuptools--the Python
2.5 version numbered 0.6c9.  To fix the error, rather than just using
the regular Ubuntu copy of easy_install, I had to manually tell
easy_install to install setuptools-0.6c9-py2.5.egg as was done in lines
28-50 here
<http://bazaar.launchpad.net/%7Ecaneypuggies/+junk/CaneyPUGgies_tools/revision/4>. 
This guarantees that (the virtual environment's copy of) easy_install
downloads & installs the Python 2.5 version of TurboGears.

Later
<http://bazaar.launchpad.net/%7Ecaneypuggies/+junk/CaneyPUGgies_tools/revision/20>
in my testing CaneyPUGgies_env_setup.sh I found it was no longer
necessary to manually install setuptools-0.6c9-py2.5.egg so long as I
made the script install python-setuptools using apt-get around line 32.

So, you may need to run the following commands to install the right
version of setuptools:

sudo apt-get install python-setuptools
cd ~/Projects/tg21env
source bin/activate
easy_install -m setuptools
rm -rf lib/python2.5/site-packages/setuptools*
# Creating TurboGears 2.1 app...
# Download setuptools-0.6c9 since TurboGears 2.1 requires it
wget
http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9-py2.5.egg
# Make directory for Python 2.5 if it doesn't exist...but if it doesn't
exist, then you probably need to re-create your virtual environment this
way:  "virtualenv --no-site-packages -p python2.5 tg21env", then run the
rest of the CaneyPUGgies_env_setup.sh script that follows the virtualenv
command
mkdir lib/python2.5
# Install setuptools-0.6c9
easy_install -m ./setuptools-0.6c9-py2.5.egg
# Delete egg file since it's no longer needed
rm setuptools-0.6c9-py2.5.egg

After this you may have to run the following to get the setuptools error
to go away:

# Install TurboGears 2.1
easy_install -i http://www.turbogears.org/2.1/downloads/current/index
tg.devtools

While running the commands above, if you encounter any error messages
you can't resolve, please post them to this email list and I or others
may be able to help.

Tim

-- 
Tim Black
Pastor, /Caney Orthodox Presbyterian Church <http://caneyopc.org>/, 206
N. Vine St, Caney, KS 67333
Web Developer & Owner, /Always Reformed Web Development
<http://www.alwaysreformed.com>/, 801 S State St, Caney, KS 67333
o (620) 879-2359 - h/o (620) 306-4624 - c (620) 306-1507
timblack1 on most chat networks - timblack11 on Skype

Follow ups