[Twisted-Python] Installing twisted on Snow Leopard with custom 32-bit Python from python.org

Nathan nathan.stocks at gmail.com
Fri Sep 4 12:45:11 EDT 2009


On Fri, Sep 4, 2009 at 4:21 AM, Ronald Oussoren<ronaldoussoren at mac.com> wrote:
>
> On Friday, 04 September, 2009, at 08:22AM, "Nathan" <nathan.stocks at gmail.com> wrote:
>>I've installed the 32-bit Python on Snow Leopard (for various reasons
>>unrelated to twisted) and would like to get twisted working with it.
>>I've tried downloading twisted and running the standard "sudo python
>>setup.py install" -- but that seems to simply install it in the system
>>Python installation.  How can I get twisted installed where the Python
>>installation that I got from python.org can use it?
>
> Your probably using /usr/bin/python rather than the one you downloaded from Python.org.
>
> What's the output of 'which python'?  The python.org installer places binaries into /usr/local/bin, and also has a script in /Application/Python 2.6/ that will patch the startup profile of your shell to ensure that the python.org binaries are earlier on $PATH than the system install.

Nope, I was calling
"/Library/Frameworks/Python.framework/Versions/2.6/bin/python"
explicitly, which is the location that the binary 32-bit installer
indicated it was installing into.  I disabled most (maybe all) of the
"helpful" python.org installer features like altering my path for me,
installing into /usr/local/bin, and installing the GUI apps.

But since you are mentioning it, perhaps twisted will install into the
custom python if it is earlier in the path than the system python?
Trying....nope.  Well, something's different--perhaps there's more
paths I need to add?  Here's what I tried:

export PATH="/Library/Frameworks/Python.framework/Versions/2.6/bin/:$PATH"

$ sudo python setup.py install
running install
running build
running build_py
running build_ext
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3
-I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
-c conftest.c -o conftest.o
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3
-I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
-c conftest.c -o conftest.o
conftest.c:1:23: error: sys/epoll.h: No such file or directory
conftest.c:1:23: error: sys/epoll.h: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//ccIcwAI5.out
building 'twisted.runner.portmap' extension
creating build/temp.macosx-10.3-fat-2.6
creating build/temp.macosx-10.3-fat-2.6/twisted
creating build/temp.macosx-10.3-fat-2.6/twisted/runner
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3
-I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
-c twisted/runner/portmap.c -o
build/temp.macosx-10.3-fat-2.6/twisted/runner/portmap.o
In file included from
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobject.h:4,
                 from
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:85,
                 from twisted/runner/portmap.c:10:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error:
stdarg.h: No such file or directory
In file included from
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobject.h:4,
                 from
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:85,
                 from twisted/runner/portmap.c:10:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25: error:
stdarg.h: No such file or directory
lipo: can't figure out the architecture type of: /var/tmp//ccnV11Ya.out
error: command 'gcc' failed with exit status 1


~ Nathan



More information about the Twisted-Python mailing list