Re: [Pyobjc-dev] Help getting Started with PyObjc2 and Leopard
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ron...@ma...> - 2007-11-29 14:53:07
|
On 29 Nov, 2007, at 15:13, George Armah wrote:
> Hello,
>
> This is my first attempt at using pyobjc and I run into some problems.
The problem you're having is that you have a python framework in /
Library/Frameworks. The easiest way to fix your problems is to remove
that framework (or move it aside if you want to check which site-
packages need to be reinstalled).
The system install of python is 2.5.1 + dtrace support and there is
therefore no need to install a python framework in /Library/
Frameworks. Well, at least not unless you want to build
redistributable applications for OSX 10.4 using py2app.
Ronald
>
>
> 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.
>
>
>
>
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell. From the desktop to the data center, Linux is going
> mainstream. Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4_______________________________________________
> Pyobjc-dev mailing list
> Pyo...@li...
> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
|