Fix tg21 setuptools error

Bug #600879 reported by Tim Black
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Reformed Churches Locator
Fix Released
Critical
Tim Black

Bug Description

When my controller code throws an error, the default TurboGears 2.1 installation throws an error about setuptools. Fix this error in the CaneyPUGgies_env_setup.sh script, then notify the members about how they can implement the fix.

Changed in reformedchurcheslocator:
assignee: nobody → Tim Black (tim-alwaysreformed)
Revision history for this message
Tim Black (tim-alwaysreformed) wrote :

Here is what I just did to correct the setuptools error on my computer.

1. In Meld, I compared 1) the virtualenv I'm using for another TurboGears 2.1 project I'm working on that is thankfully free from the setuptools error with 2) the virtualenv I'm using for the Reformed Churches Locator code. (Note: Virtualenv 1) uses Python 2.6, and 2) uses Python 2.5, so the files I compared are not all in the same directories, which meant I needed to compare virtualenv1/lib/python2.6 with the respective virtualenv2/lib/python2.5, in case you end up doing a similar comparison in the future.)

2. I noticed that virtualenv1/lib/python2.6/site-packages/setuptools.pth contained "./setuptools-0.6c9-py2.6.egg", but virtualenv2/lib/python2.5/site-packages/setuptools.pth contained "./distribute-0.6.10-py2.6.egg". I believe the reason for this difference is 1) that the most recent versions of setuptools are now packaged in an egg named "distribute", 2) I had installed the most recent version of setuptools in virtualenv1, and 3) I already fixed the problem in virtualenv1 by manually installing setuptools-0.6c9, then manually changing the setuptools.pth file to point to that earlier version of setuptools.

3. So to fix this, what I needed to do, and what you can do, if (for example) your virtualenv is for Python 2.5 (otherwise change the references to "2.5" to "2.6"), is run the following commands:

# change to correct directory
cd ~/Projects/
# activate virtualenv
source tg21env/bin/activate
# allow installing multiple versions of setuptools
easy_install -m setuptools
# download & install correct setuptools egg
easy_install http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9-py2.5.egg
# set setuptools.pth to point to setuptools-0.6c9
# this last step was all I needed to do (since I had already done the steps above), but you may need to do the steps above, also
echo "./setuptools-0.6c9-py2.5.egg" > tg21env/lib/python2.5/site-packages/setuptools.pth

Revision history for this message
Tim Black (tim-alwaysreformed) wrote :
Changed in reformedchurcheslocator:
status: Confirmed → Fix Committed
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.