No module named Blender in 2.5?


I have spent the last month or so writing a complex python script that works fine in 2.48a. I thought I would try it out in 2.5 20117 just to see how it performs. NOT.

I get an error “No module named Blender” WTF?

So all scripts need to be re-written to work with 2.5

Say it isn’t so:no:

All scripts need to be rewritten for Blender 2.5 - It’s been discussed many times now during meetings.

Both a new/improved API and the likely move to Python 3.0 make it so scripts will have to be rewritten. Just see it as a way to improve your scripts.



I guess I won’t be using 2.5 for a while. I just got the hang of scripting in 2.48a.

This is the worst news I have heard in a while.:(:(:(:(:(:frowning:

So anything that is running in 2.48a is a dead script?


No previous python scripts will work in Blender 2.5. I am going to type it again.

So what are we getting out of 2.5?

The Blender 2.5 API will invalidate all scripts for previous versions of Blender all over the web.

It’s really not that hard to fix the scripts for 2.50, geez.

you need to put on daft punk. work make us, harder better stronger faster. :smiley: and just hang in there until 2.5 and rewrite your script prolly you gonna do some refactoring anyway of it.

This is a complex issue, but since your just getting started out with Blender python scripting try and understand that the pre 2.5 API can only be stretched so far. Once you get to a certain point with it, things become very problematic. 2.5 will hopefully fix all these problems.

For what its worth, I have been maintaining thousands of lines of python code written for the current API in a production enviorment for several years now. I can tell you from experience that the current API can bite you hard in ways you least expect. Because of this I have no reservations about retargeting all my code for 2.5 because the pros definitely outweigh the cons.

Trust me, the changes being made here are the result of very informed decisions.


just change blender to bpy and see if that works

but yeah access to data will change and python will use operators “what blender can do python can do” but to cater for this major changes had to be done and they simply was not compatible with the old api

scripts will not be hard to port as the new api will be roughly the same in terms of syntax etc etc

So much of 2.5 python api is speculation and unknown at the moment so I cant give an answer on this.
Only think that may be of some conciliation is myself and others will be porting scripts to 2.5 so we will probably hit most of the the problems first - and resolve them.
There are 2 GSOC projects that will also be working in this area so the 2.5 api will be getting some attention from more people.

So there is no “compatability mode” planned?