Previous Thread  Next Thread

chat icon Python module problems on Ubuntu 10.04

messn

Posted: Tue Jan 24, 2012 12:18 am
Joined: 23 Jan 2012
Posts: 3
Hi,

I have installed blender package on Ubuntu 10.04. I thought it would install python support for blender. Now i'm trying to import Blender modules from python interpreter but it can not find blender module.
This is the command i gave
Code:
import Blender

and the output is:
Code:
ImportError: No module named Blender

The same for 'import bpy'.
Using python2.6 and the output of
Code:
blender -v

is
Code:
Blender 2.49 (sub 2) Build


I have also downloaded blender-2.49b release and compiled with cmake. It created lots of *.o files in 'source/blender/python/api2_2x' folder but there are not any python modules in subfolders of build folder.

Now what should i do? A solution without any compilation process, only by using apt-get tools would be best. But an explanation of the way of compiling blender also to create python modules is good too.

Thank you!
Reply with quote


stiv

Posted: Tue Jan 24, 2012 3:36 am
Joined: 05 Aug 2003
Posts: 3645
Quote:
. Now i'm trying to import Blender modules from python interpreter


Blender has its own embedded Python interpreter. These commands only work from inside Blender.

Old Blender (2.49 and older) needs a separate Python install. For Cmake, don't forget the 'make install' step and do run blender from the install dir, NOT the build dir.

Have you looked at the compilation instructions on the wiki?
Reply with quote


messn

Posted: Tue Jan 24, 2012 12:16 pm
Joined: 23 Jan 2012
Posts: 3
Thank you stiv,

Now i understand the concept of scripting in blender. I'm going to try to code an Hello World script.

Best wishes!
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group