Need assistance with OS-X 10.2 and Python 2.3 with Blender

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
hotmonkey
Posts: 0
Joined: Mon Aug 23, 2004 10:54 pm

Need assistance with OS-X 10.2 and Python 2.3 with Blender

Post by hotmonkey »

Need a bit of help on getting Python 2.3 working with Blender.

What Blender gave me as a default (system info results from help menu)...

OS X 10.2.8

Platform Darwin
Python
- Version 2.3.1 (#1, Apr 27 2004, 17:05:24)
[GCC 3.1 20020420 (prerelease)]
- Path:
/sw/lib/python23.zip
/sw/lib/python2.3/
/sw/lib/python2.3/plat-darwin
cf
/sw/lib/python2.3/plat-mac/lib-scriptpackages
|
|
V
/Applications/Blender/Blender.app/Contents?MacOS/.blender/scripts
^---< It is getting correct information somewhere as this is where I put it >
...
========

Installed Python2.3 and ended up with this...

Python 2.3 (#1, Aug 23 2004, 04:13:54)
[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/Library/Frameworks/Python.framework/Versions/2.3/lib/python23.zip',
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3',
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-darwin',
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-mac',
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-mac/lib-scriptpackages',
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-tk',
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload',
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages']
>>>
========

Tried to follow the instructions...

Even if you do have the right version of Python installed you may need to tell the embedded Python interpreter where the installation is. To do that it's enough to set a system variable called PYTHON to the full path to the stand-alone Python executable (to find out execute "import sys; print sys.executable" inside the stand-alone interpreter, not in Blender). To check which Python was linked to your Blender binary, execute "import sys; print sys.version" at Blender's text editor), it's probably 2.3.something -- only the two first numbers should have to match with yours.

========

Question,
How do you tell the embeded interpreter where to find the above installation? (and by the way, where would I have found that)

Instructions say to 'execute "import sys; print sys.version" at Blender's text editor', unfortunately I have a "PYTHON Script error" that keeps it from working... Possibly because it is not pionted to the correct place?

Looked in a lot of *.py files for a clue as to how and where to point it, but I cannot figure it out, unless it was compiled into the original file that I downloaded from blender.org.

Thought I would simply compile it it from CVS with "fink", but not listed there....

From what I have been reading in the manuals and messages is others seem to have it working on 10.2, but not how it happened other than "I've got it working... Thanks!".

If someone would be so kind as to offer some steps, or a place to look for the answer it would be most helpful.

Because I want to hurry up and start to have fun like the rest of you! Thank you!

jesterKing
Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Re: Need assistance with OS-X 10.2 and Python 2.3 with Blend

Post by jesterKing »

hotmonkey wrote: How do you tell the embeded interpreter where to find the above installation?
from your own post:
To do that it's enough to set a system variable called PYTHON to the full path to the stand-alone Python executable
/Nathan

hotmonkey
Posts: 0
Joined: Mon Aug 23, 2004 10:54 pm

Re: Need assistance with OS-X 10.2 and Python 2.3 with Blend

Post by hotmonkey »

Thank you for your quick respones.

Since fear of embarrasement is not a problem and I want to make this work.

Yes create a system variable, but as who? root, user? and where to place it so to speak? as the local logged in user didn't seem to work when I tried.

This is one of the those cases where I can do quite a bit on occasion, just need to know where the silly 'ON' switch is... Thanks. So possibly a slightly different way of saying that I already have the answer, a one line example (eg. "in terminal/pico as root/sudo/user type PYTHON=/../.) as this will be of help to me.
from your own post:

To do that it's enough to set a system variable called PYTHON to the full path to the stand-alone Python executable

/Nathan
Again, Thank for you post, every bit is a help and looking forward to having fun with this!

sgefant
Posts: 30
Joined: Wed Oct 16, 2002 1:10 am

Post by sgefant »

have you tried installing python with fink? The python package from fing gets installed to /sw, which is where blender seems to be looking for python.

sgefant

hotmonkey
Posts: 0
Joined: Mon Aug 23, 2004 10:54 pm

Post by hotmonkey »

sgefant wrote:have you tried installing python with fink?
Yes, the first thing, however it asked for which X11 to use as a placeholder, chose a version I thought would work with osx 10.2, but it generated errors during compile saying that this was only a placeholder for the proper version. not having the knowledge of which is considered the "proper Version" for 10.2 and not wanting to destroy the machine do to my error, simply passed and tried to use python2.3 in framework mode (the version that gives MacPyton after it is installed.

If someone can suggess which x11 to use with 10.2, I'll try fink again, but as it is now, after setting an environmental variable to "PYTHON=/Lib../Framew.../../../python" and seting that as the path to python in the panel that has all of the directories for things (I hope ths is what is referred to as the console because I cannot find anything else that might fit this discription) it started crashing when asked for Help>system info, when it did to work before (bit of a step backwards I think) may have to remove the path and try something else.

I realize this may be one of those simple things once I realize what is going on, until then it is still quite a mystery that I wish to solve with a few more suggestions.

If I could afford to get 10.3, I would. It will have to wait a bit as I save up. ;)

Thank you, Brian.

lukep
Posts: 0
Joined: Sun Apr 04, 2004 1:39 pm

Post by lukep »

hotmonkey wrote:
sgefant wrote:have you tried installing python with fink?
Yes, the first thing, however it asked for which X11 to use as a placeholder, chose a version I thought would work with osx 10.2,
Ouch.

10.2 build NEED python fink to work, and nothing else. linking with a framework is not possible and will cause crash when you use it. the libs are simply not in same format.

Now what you can try, but without be certain of success, is to use the 10.3 build which expect a python framework. (not sure that Os X is smarter enough to rehash the search path, as I understand macPython is installed in /lib and not in system)

Fox X11, the thing to do is to install the Apple package. then the fink placeholder which is only used to say to others packages that X11 is installed.

hotmonkey
Posts: 0
Joined: Mon Aug 23, 2004 10:54 pm

Post by hotmonkey »

Fox X11, the thing to do is to install the Apple package. then the fink placeholder which is only used to say to others packages that X11 is installed.
I tend to agree that the hang up is now only the X11 part, however which apple package would someone suggest for 10.2? The "X11 Public Beta 3" is unavailable from Apple, and current X11 seems only to work with 10.3. Would the fink's "xfree86 4.3.0-16" version be allowed without messing up the system? Or would the "X11 Mac OS X Public Beta SDK" have the parts necessary if used with fink's "system-xfree86-..." pointer files.

Getting closer I think, Thank you.

Brian

sgefant
Posts: 30
Joined: Wed Oct 16, 2002 1:10 am

Post by sgefant »

if you install the python2.3-nox package with apt-get, you don't have to install X11.

hotmonkey
Posts: 0
Joined: Mon Aug 23, 2004 10:54 pm

Post by hotmonkey »

sgefant wrote:if you install the python2.3-nox package with apt-get, you don't have to install X11.
This will be today's project to try. However, once loaded will I look in the /sw section for the python executable to run and get the path or will it drop that part into the regular osx/usr... area? Reason is that I may still have to create a pionter to python for things to actually work, also will the be the same path that i put into the console's python path field.

Not that I am totally confused, just that I am working on this from several suggestions and narrowing down the stuff that is overlapping or superceeded by a better way.

Once I get past the "python script error:check console" though still a little fuzzy on exactly what I am checking for, the FUN part begins, I can export my files!

Again, THANK YOU ALL!

Post Reply