Struck trying to install on Snow Leopard

10 views
Skip to first unread message

Todd Blanchard

unread,
Dec 20, 2009, 3:46:22 PM12/20/09
to TurboGears
First, the virtualenv script seems broken. I asked in the virtualenv
group and they say it needs to be regenerated or something. It
generates the following error:

python tg2-bootstrap.py --no-site-packages tg2env
New python executable in tg2env/bin/python
ERROR: The executable tg2env/bin/python is not functioning
ERROR: It thinks sys.prefix is '/System/Library/Frameworks/
Python.framework/Versions/2.6' (should be '/Users/todd/Projects/iParq/
tg2env')
ERROR: virtualenv is not compatible with this system or executable
[todd]~/Projects/iParq>sudo python tg2-bootstrap.py --no-site-packages
tg2env
Password:
New python executable in tg2env/bin/python
ERROR: The executable tg2env/bin/python is not functioning
ERROR: It thinks sys.prefix is '/System/Library/Frameworks/
Python.framework/Versions/2.6' (should be '/Users/todd/Projects/iParq/
tg2env')
ERROR: virtualenv is not compatible with this system or executable

So fine - I try the manual setup instead. I successfully create the
virtualenv and activate it.

Then run the easy_install script

easy_install -i http://www.turbogears.org/2.0/downloads/current/index
tg.devtools

and it chugs for awhile and then dies with

File "/Users/todd/Projects/iParq/tg2env/lib/python2.6/site-packages/
setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py", line
919, in run_setup
File "/Users/todd/Projects/iParq/tg2env/lib/python2.6/site-packages/
setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py", line 62, in
run_setup
File "/Users/todd/Projects/iParq/tg2env/lib/python2.6/site-packages/
setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py", line 105, in run
File "/Users/todd/Projects/iParq/tg2env/lib/python2.6/site-packages/
setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py", line 64, in
<lambda>
File "setup.py", line 4, in <module>
ImportError: No module named ez_setup

So what am I doing wrong?

Diez B. Roggisch

unread,
Dec 21, 2009, 3:53:53 AM12/21/09
to turbo...@googlegroups.com
Todd Blanchard schrieb:

I think you somehow managed to botch your python installation. And
whatever keeps virtualenv from working kills your installation as well.
So I'd suggest you try & fix python itself, and make VE running.


Diez

shadowfox

unread,
Feb 18, 2010, 2:40:43 AM2/18/10
to TurboGears
I don't know if you have found the solution yet.
But I got the same problem and I downloaded the latest version of
ez_setup.py from:

http://peak.telecommunity.com/dist/ez_setup.py

and then run it as so:

sudo ez_setup.py -U setuptools

This updates my setuptools to the correct version for the current
python environment. So you should be able to continue whatever it was
you're trying to do.

Hope this helps.

On Dec 20 2009, 2:46 pm, Todd Blanchard <tblanch...@mac.com> wrote:
> Then run the easy_install script
>

> easy_install -ihttp://www.turbogears.org/2.0/downloads/current/index

beevee

unread,
Feb 24, 2010, 6:52:38 AM2/24/10
to TurboGears
I've not had much luck on Snow Leopard with the default [Apple's]
Python installation. To get around it I've [done this 3 times]
installed MacPorts (from tarball, not from the dmg) and then installed
the MacPorts Python distribution with the universal variant (important
so that you get the 64-bit tidbits). Following the two commands the
MacPorts Python install gives you at the end is nice as it alters your
path to essentially go around the Apple Python install selecting the
new Python dist under /opt/local/... Use MacPorts to install setup-
utils, and if you're using PostgreSQL the postgres environment and
psychopg2, and Virtualenv and then you should be off to the races.

I've read a few things that point to a difference in the version of
GCC that Apple used to compile the Python dist vs. the version
Python.org uses. IDK, I just know that after figuring this out
setting up a Python dev environment suddenly became more-or-less as
painless as it is on Ubuntu.

Alice Bevan-McGregor

unread,
Feb 24, 2010, 1:11:35 PM2/24/10
to turbo...@googlegroups.com
Hello,

The only major difficulties -I- have had with Snow Leopard are installing support libraries like PIL and mysql-python. For some I’ve had to manually download, compile, and install libraries like libjpeg. None of my tweaking and shoe-horning has ever required installing a new version of Python (from the Python.org standard installer or otherwise) or required the installing of Ports or another Linux-style package system.

I use my http://gist.github.com/287670 script to perform new installations on both my development machine and production servers. Lines 6→13 are new and untested, but those are the first two instructions I enter into a fresh install of Snow Leopard. Adjust it to taste, e.g. lines 25, 29, and 33. The latter two are where you define the version of TurboGears the script installs.

Good luck!

— Alice.

Todd Blanchard

unread,
Feb 24, 2010, 7:43:48 PM2/24/10
to turbo...@googlegroups.com
Thanks, but I solved this ages ago.

Also, I DESPISE macports. Easier in just about every case to compile from source and install in the standard location.

> --
> You received this message because you are subscribed to the Google Groups "TurboGears" group.
> To post to this group, send email to turbo...@googlegroups.com.
> To unsubscribe from this group, send email to turbogears+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.
>

Reply all
Reply to author
Forward
0 new messages