Re: Locating Frameworks
Re: Locating Frameworks
- Subject: Re: Locating Frameworks
- From: F van der Meeren <email@hidden>
- Date: Tue, 15 Jun 2010 18:19:04 +0200
That didn't do much for me.
It seems that the /Library/Frameworks path is overwritten at runtime by its the second in line /System/Library/Frameworks.
On 15 Jun 2010, at 18:06, email@hidden wrote:
>
>
> On 15 Jun 2010, at 14:58, F van der Meeren wrote:
>
>> Hi,
>>
>> I am trying to link to the Python.framework.
>> According to the manpages the framework directories are searched in the following order:
>> "The default framework search path is /Library/Frameworks then /System/Library/Frameworks."
>>
>> Running my code:
>>
>> Py_Initialize();
>> PyRun_SimpleString("import sys\n"
>> "print('Version: ', sys.version)\n");
>> Py_Finalize();
>>
>> Shows the following:
>> ('Version: ', '2.6.1 (r261:67515, Feb 11 2010, 00:51:29) \n[GCC 4.2.1 (Apple Inc. build 5646)]')
>>
>> But I have Python 3.1.2 installed in the /Library/Frameworks path, shouldn't this library be used and result in the following version info ?
>> '3.1.2 (r312:79360M, Mar 24 2010, 01:33:18) \n[GCC 4.0.1 (Apple Inc. build 5493)]'
>>
>> So my question is the following: How do I force the linking with the Python 3.1.2 version (or highest version installed)?
>>
> Try calling Py_SetProgramName() before Py_Initialize()
>
> NSString *launchPath = @"/Library/Frameworks/Python.framework/versions/current/bin/python";
> Py_SetProgramName((char *)[launchPath UTF8String]);
>
> Regards
>
> Jonathan Mitchell
>
> Developer
> Mugginsoft LLP
> http://www.mugginsoft.com
>
>> Thanks,
>>
>> Filip
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden