[Pyobjc-dev] Help getting Started with PyObjc2 and Leopard
Brought to you by:
ronaldoussoren
|
From: George A. <ar...@gm...> - 2007-11-29 14:13:08
|
Hello,
This is my first attempt at using pyobjc and I run into some problems.
I created a new project using XCode 3.0 with the Cocoa-Python
Application template.
I then proceeded to do a build on the application (n.b. I haven't added
any of my own code yet) and the build succeeded.
When I do a build and run however, I get the following error message in
console:
//--------------------------------------------------------------------------------------------------------------------------------
The Debugger Debugger is attaching to process
[Session started at 2007-11-29 08:32:29 -0500.]
Traceback (most recent call last):
File
"/Users/Armahg/Builds/Release/again.app/Contents/Resources/main.py",
line 10, in <module>
import objc
ImportError: No module named objc
2007-11-29 08:32:29.349 again[2542:10b] *** Terminating app due to
uncaught exception 'NSInternalInconsistencyException', reason:
'/Users/Armahg/again/main.m:46 main() PyRun_SimpleFile failed with file
'/Users/Armahg/Builds/Release/again.app/Contents/Resources/main.py'.
See console for errors.'
2007-11-29 08:32:29.352 again[2542:10b] Stack: (
2488480363,
2511437979,
2488479819,
2488479882
)
//--------------------------------------------------------------------------------------------------------------------------------
>From what I have read, i thought pyobjC2 should work right out of the
box with Leopard. Is there anything configuration I have to do to get
the app working?
I also tried to run some of the PyObjc examples and received the
following error message
//--------------------------------------------------------------------------------------------------------------------------------
Armahg:CurrencyConverter Armahg$ python setup.py py2app
Traceback (most recent call last):
File "setup.py", line 8, in <module>
import py2app
ImportError: No module named py2app
//--------------------------------------------------------------------------------------------------------------------------------
TroubleShooting done so far:
My current path for Python is:
Armahg$ which python
/Library/Frameworks/Python.framework/Versions/Current/bin/python
I modified the main.m file in my test PyObjc app to read
/*Py_SetProgramName("/usr/bin/python");*/
Py_SetProgramName("/Library/Frameworks/Python.framework/Versions/Current/bin/python");
and this has not helped either.
Any help given would be much appreciated. Also, in return, I'll document
what I do and post it somewhere online so that
other newcomers won't have to email this dev list with the same problem
again :)
Thanks in advance ,
George.
|