[Twisted-web] twisted on mac. twisted.web problems.

Ronald Oussoren ronaldoussoren at mac.com
Sun Nov 11 03:09:53 EST 2007


On 11 Nov, 2007, at 1:10, aaron smith wrote:

> I've tried this on Mac Tiger and mac Leopard. To no avail. On Tiger it
> had the same issues, versions / to many python locations..
>
>
> My default machine is leopard.
>
> My python executable is here: /usr/bin/python
>
> It seems like there are too many installations or something. would it
> be problematic to remove mac's default python and just re-install it
> all myself?

Yes. Don't remove Apple's copy of python, it is used by the OS itself  
and 3th party applications rely on it being there.

Multiple python installations on a single machine are perfectly safe,  
although it can be confusing when you don't know about all of them and  
you accicently invoke a different version of python that you thought  
you would.

> It seems there are issues with all these python files all
> over the place.
>
> so far there are:
> /usr/bin/python
> /usr/lib/python2.5

This are part of the system install

>
> /Library/Python/2.5
> /Library/Python/2.3

These are site-packages directorys for python 2.3 and python 2.5

>
> /System/Library/Frameworks/Python.framework

This is the system install of python and contains the installations  
for python 2.5 and 2.3 (the former is not present on 10.3).

Other common locations of a python installation are /Library/ 
Frameworks/Python.framework (the python.org distribution of python, as  
well as ActiveState's python), /opt/local/bin (MacPorts) and /sw/bin  
(Fink).

Ronald

>
>
>
> Thanks
>
>
>
>
>
> On Nov 8, 2007 9:20 PM, Ronald Oussoren <ronaldoussoren at mac.com>  
> wrote:
>>
>>
>> On 9 Nov, 2007, at 0:58, aaron smith wrote:
>>
>>>> Run this:
>>>>>>> import sys
>>>>>>> print sys.path
>>> ------
>>> ['', '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>>> python23.zip',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>>> python2.3',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>>> python2.3/plat-darwin',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>>> python2.3/plat-mac',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>>> python2.3/plat-mac/lib-scriptpackages',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>>> python2.3/lib-tk',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>>> python2.3/lib-dynload',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.3/lib/
>>> python2.3/site-packages',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.3/Extras/ 
>>> lib/
>>> python']
>>>
>>>
>>>> cd  Library/Python/2.3/site-packages/
>>>> $ python
>>>>>>> import twisted
>>> -------------
>>>>>> import twisted.web
>>>>>>
>>>
>>>
>>> I've tried what you suggested previously with the PYTHONPATH as  
>>> well.
>>> It still works partially, but then fails on zope.interface. (which I
>>> did install). It just seems like there are some crazy complications
>>> that I can't figure out. dah!
>>>
>>> thanks for help man.
>>
>> On with system was this, 10.4 or 10.5? On Leopard  the default python
>> install is Python 2.5.1, which doesn't match the list above.
>>
>> The TwistedCore is part of the default install in Leopard, TwistedWeb
>> is not. Do you perhaps have multiple Python installations? This could
>> cause the problems you're seeing, maybe the the python on your shells
>> PATH is not the one you're expected.
>>
>> Check the output of "which python" to make sure (or print
>> sys.executable on the python prompt).
>>
>> Ronald
>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Nov 8, 2007 12:00 PM, Dmitry Kozhevin <dmitrikozhevin at gmail.com>
>>> wrote:
>>>>> ImportError: No module named web
>>>>
>>>> Run this:
>>>>>>> import sys
>>>>>>> print sys.path
>>>>
>>>> And email me what you get.
>>>>
>>>> And one more,
>>>> cd  Library/Python/2.3/site-packages/
>>>> $ python
>>>>>>> import twisted
>>>>
>>>> _______________________________________________
>>>> Twisted-web mailing list
>>>> Twisted-web at twistedmatrix.com
>>>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>>>>
>>>
>>> _______________________________________________
>>> Twisted-web mailing list
>>> Twisted-web at twistedmatrix.com
>>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>>
>>
>> _______________________________________________
>> Twisted-web mailing list
>> Twisted-web at twistedmatrix.com
>> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
>>
>>
>
> _______________________________________________
> Twisted-web mailing list
> Twisted-web at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2224 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-web/attachments/20071111/49da82b4/smime-0001.bin


More information about the Twisted-web mailing list