[Distutils] virtual env w/ python2.4.4 and python2.5.1 on OS X Leopard, each with different virtual setup tools problem

Noah Gift noah.gift at gmail.com
Fri Jan 4 00:58:30 CET 2008


I am attaching a thread I started privately with Ian.  The question is  
multi-part and somewhat complicated so please be patient.

Background:

I am running python2.5.1, the system python, i.e., default on  
Leopard:  /System/Library/Frameworks/Python.framework/Versions/2.5/bin/ 
python2.5
I have installed virtualenv via easy_install.
I use virtualenv where an entry point was setup in /usr/local/bin/ 
virtualenv to create a separate virtualenv.

This is the buffer from my terminal: (note I use virtualenv to create  
a groknoahgift virtual env and then run easy_install grokproject egg  
from there).

> The main problem I have is this traceback:
> [ngift at Macintosh-6][H:10944][J:0]> virtualenv groknoahgift
> New python executable in groknoahgift/bin/python
> Installing setuptools............done.
> [ngift at Macintosh-6][H:10945][J:0]> groknoahgift
> [ngift at Macintosh-6][H:10946][J:0]> ll
> total 0
> drwxr-xr-x  7 ngift  staff  238 Jan  3 09:46 bin
> drwxr-xr-x  3 ngift  staff  102 Jan  3 09:46 lib
> [ngift at Macintosh-6][H:10947][J:0]> bin/easy_install grokproject
> Searching for grokproject
> Best match: grokproject 0.6
> Processing grokproject-0.6-py2.5.egg
> Adding grokproject 0.6 to easy-install.pth file
> Installing grokproject script to /Users/ngift/src/groknoahgift/bin
> Using /Library/Python/2.5/site-packages/grokproject-0.6-py2.5.egg
> Processing dependencies for grokproject
> Finished processing dependencies for grokproject
> [ngift at Macintosh-6][H:10948][J:0]> pwd
> /Users/ngift/src/groknoahgift
> [ngift at Macintosh-6][H:10949][J:0]> ll
> total 0
> drwxr-xr-x  8 ngift  staff  272 Jan  3 09:46 bin
> drwxr-xr-x  3 ngift  staff  102 Jan  3 09:46 lib
> [ngift at Macintosh-6][H:10950][J:0]> bin/grokproject noahgift
> Traceback (most recent call last):
>  File "bin/grokproject", line 5, in <module>
>    from pkg_resources import load_entry_point
>  File "build/bdist.linux-i686/egg/pkg_resources.py", line 2561, in  
> <module>
>  File "build/bdist.linux-i686/egg/pkg_resources.py", line 626, in  
> require
>  File "build/bdist.linux-i686/egg/pkg_resources.py", line 524, in  
> resolve
> pkg_resources.DistributionNotFound: PasteScript>=1.3

In trying to track down this problem, I then realized that for Grok, I  
need to use python2.4.4, so I did this to get around the problem, as  
Ian suggested:

[ngift at Macintosh-6][H:10996][J:0]> curl http://svn.colorstudy.com/virtualenv/trunk/virtualenv.py 
  > virtualenv-2.4
   % Total    % Received % Xferd  Average Speed   Time    Time      
Time  Current
                                  Dload  Upload   Total   Spent     
Left  Speed
100 35516  100 35516    0     0  45505      0 --:--:-- --:--:--  
--:--:-- 80395
[ngift at Macintosh-6][H:10997][J:0]> python2.4 virtualenv-2.4 src/py24ENV
New python executable in src/py24ENV/bin/python
Installing setuptools.................done.
[ngift at Macintosh-6][H:10998][J:0]> cd src/py24ENV
[ngift at Macintosh-6][H:10999][J:0]> bin/easy_install grokproject


Question:  Does it make sense two follow the easy-install example and  
make an entrypoint that corresponds to the python path?



More information about the Distutils-SIG mailing list