[Bf-python] python 2.3

Jiba jiba at tuxfamily.org
Mon Aug 18 19:40:59 CEST 2003


On Thu, 14 Aug 2003 10:11:13 +0300
Mats Holmberg <mats.holmberg at welho.com> wrote:

> Hi
> 
> I'm using Python 2.3 and thought I would try the new Blender with it. 
> Does it work? It's failing at least when encountering "import string" 
> with the following error:
> 
> Run Python script "Text" ...
> /usr/lib/python2.3/types.py:52: Warning: 'yield' will become a reserved 
> keyword in the future
> warning: Python C API version mismatch for module strop: This Python has 
> API version 1011, module strop has version 1012.
> Traceback (most recent call last):
>   File "Text", line 1, in ?
>   File "/usr/lib/python2.3/string.py", line 379, in ?
>     from strop import maketrans, lowercase, uppercase, whitespace
>   File "/usr/lib/python2.3/warnings.py", line 6, in ?
>     import sys, types
>   File "/usr/lib/python2.3/types.py", line 52
>     yield 1
>           ^
> SyntaxError: invalid syntax
> /usr/lib/python2.3/os.py:282: Warning: 'yield' will become a reserved 
> keyword in the future
> 'import site' failed; use -v for traceback
> 
> Also when starting Blender I always get the following:
> 
> Could not find platform independent libraries <prefix>
> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> /usr/lib/python2.3/os.py:282: Warning: 'yield' will become a reserved 
> keyword in the future
> 'import site' failed; use -v for traceback
> Using a clean Global Dictionary.
> 
> I haven't got a clue what this means =)
> I'm using Linux Mandrake 9.1 on an AthlonXP 1700+

Are you sure you are using Python 2.3 ? I believe you are using a mix of 2.2.x and 2.3 (e.g. the 2.2 binary with the 2.3 library, or the contrary) : "yield" IS a reserved in 2.3, and the "'yield' will become a reserved keyword in the future" warning usually occurs in 2.2 (but no longer in 2.3).

Maybe you should check the Python binary version number ("import sys; print sys.version"), and the library version you are using (try "import itertools" ; this module exists only in 2.3).

Hope this helps,
Jiba



More information about the Bf-python mailing list