[Pythonmac-SIG] Module Import Problem

Mike smartmike1 at gmail.com
Sun Apr 25 18:50:18 CEST 2010


Using easy_install. I installed easy_install by using this script:
http://peak.telecommunity.com/dist/ez_setup.py
I ran that as python ez_setup.py seetuptools
Then:
easy_install pyttsx

----- Original Message ----- 
From: "Chris Barker" <Chris.Barker at noaa.gov>
To: <pythonmac-sig at python.org>
Sent: Sunday, April 25, 2010 12:26 PM
Subject: Re: [Pythonmac-SIG] Module Import Problem


> Mike wrote:
>> I don't think I'm doing anything special really. Just running it with 
>> python zgp.py. It may be something the pyttsx package is doing...
>
> how did you install pyttsx ?
>
> -Chris
>
>
>> ----- Original Message ----- From: "Chris Barker" <Chris.Barker at noaa.gov>
>> To: <pythonmac-sig at python.org>
>> Sent: Sunday, April 25, 2010 12:14 PM
>> Subject: Re: [Pythonmac-SIG] Module Import Problem
>>
>>
>>> Mike wrote:
>>>>  File "build/bdist.macosx-10.6-universal/egg/pyttsx/__init__.py", line 
>>>> 39, in init
>>>
>>> this looks like you are running code out of the build dir, which may not 
>>> have anything to do with your problem, but it's odd.
>>>
>>> How are you running this, setting your paths, etc?
>>>
>>> -Chris
>>>
>>>
>>>>  File "build/bdist.macosx-10.6-universal/egg/pyttsx/engine.py", line 
>>>> 45, in __init__
>>>>  File "build/bdist.macosx-10.6-universal/egg/pyttsx/driver.py", line 
>>>> 64, in __init__
>>>>  File "build/bdist.macosx-10.6-universal/egg/pyttsx/drivers/nsss.py", 
>>>> line 18, in <module>
>>>>  File 
>>>> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_framework_Cocoa-2.2-py2.6-macosx-10 
>>>> .3-fat.egg/Foundation/__init__.py", line 8, in <module>
>>>>  File 
>>>> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.3-fat.egg/ 
>>>> objc/__init__.py", line 22, in <module>
>>>>    _update()
>>>>  File 
>>>> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.3-fat.egg/ 
>>>> objc/__init__.py", line 19, in _update
>>>>    import _objc
>>>> ImportError: 
>>>> dlopen(/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-1 
>>>> 0.3-fat.egg/objc/_objc.so, 2): Library not loaded: 
>>>> /usr/lib/libxml2.2.dylib
>>>>  Referenced from: 
>>>> /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10 
>>>> .3-fat.egg/objc/_objc.so
>>>>  Reason: Incompatible library version: _objc.so requires version 10.0.0 
>>>> or later, but libxml2.2.dylib provides version 9.0.0
>>>>
>>>>
>>>> ----- Original Message ----- From: "Aahz" <aahz at pythoncraft.com>
>>>> To: <pythonmac-sig at python.org>
>>>> Sent: Saturday, April 24, 2010 12:22 PM
>>>> Subject: Re: [Pythonmac-SIG] Module Import Problem
>>>>
>>>>
>>>>> On Wed, Apr 21, 2010, Mike wrote:
>>>>>>
>>>>>> My friend is testing my program for me on his Mac, he's running Snow
>>>>>> leopard. I'm using a package called Pyttsc that allows for text to
>>>>>> speech on the Mac. He's getting the following error:
>>>>>>
>>>>>> file: build/bdist.macosx-10.6universal/egpyttsx/drivers/nsss.py, line 
>>>>>> 18: no module named foundation
>>>>>>
>>>>>> I looked into this, and it seems to be something related to
>>>>>> PyObjC. However, he tried import pyobjc and got no errors. Any idea
>>>>>> what the problem might be and how to fix it?
>>>>>
>>>>> What's your OS?  What's the line of code generating this error?
>>>>>
>>>>>> Also, will this application build with py2app since it uses this 
>>>>>> package?
>>>>>
>>>>> Theoretically, yes.  I'm a bit confused, because build/ implies that
>>>>> you're already using py2app or some other distribution mechanism.
>>>>> -- 
>>>>> Aahz (aahz at pythoncraft.com)           <*> http://www.pythoncraft.com/
>>>>>
>>>>> "It is easier to optimize correct code than to correct optimized 
>>>>> code."
>>>>> --Bill Harlan
>>>>> _______________________________________________
>>>>> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>>>>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>>>>> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
>>>>
>>>> _______________________________________________
>>>> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>>>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>>>> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
>>>
>>>
>>> -- 
>>> Christopher Barker, Ph.D.
>>> Oceanographer
>>>
>>> Emergency Response Division
>>> NOAA/NOS/OR&R            (206) 526-6959   voice
>>> 7600 Sand Point Way NE   (206) 526-6329   fax
>>> Seattle, WA  98115       (206) 526-6317   main reception
>>>
>>> Chris.Barker at noaa.gov
>>> _______________________________________________
>>> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>>> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
>>
>> _______________________________________________
>> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
>
>
> -- 
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> Chris.Barker at noaa.gov
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
> 



More information about the Pythonmac-SIG mailing list