# ubuntu "import blender" module

**URL:** <https://blenderartists.org/t/ubuntu-import-blender-module/558685>\
**Category:** Python Support\
**Created:** [December 4, 2012, 10:28pm UTC](https://blenderartists.org/t/ubuntu-import-blender-module/558685 "2012-12-04T22:28:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamlax](https://blenderartists.org/letter_avatar_proxy/v4/letter/d/58956e/32.png) [@dreamlax](https://blenderartists.org/u/dreamlax)\
**Post date:** [December 4, 2012, 10:28pm UTC](https://blenderartists.org/t/ubuntu-import-blender-module/558685/1 "2012-12-04T22:28:27Z")

</div>

I installed blender on ubuntu 12.04. However, the python console doesn’t find the blender module. Is it a simple PYTHONPATH issue. I don’t seen any blender.so or any such file in my file system as well.

Thanks  
Sandeep

---

<div class="post-metadata">

**Author:** ![Uncle\_Entity](https://blenderartists.org/user_avatar/blenderartists.org/uncle_entity/32/8856_2.png) [@Uncle\_Entity](https://blenderartists.org/u/Uncle_Entity)\
**Post date:** [December 4, 2012, 10:59pm UTC](https://blenderartists.org/t/ubuntu-import-blender-module/558685/2 "2012-12-04T22:59:23Z")

</div>

Blender is a program and not a python module.

---

<div class="post-metadata">

**Author:** ![dreamlax](https://blenderartists.org/letter_avatar_proxy/v4/letter/d/58956e/32.png) [@dreamlax](https://blenderartists.org/u/dreamlax)\
**Post date:** [December 6, 2012, 4:13am UTC](https://blenderartists.org/t/ubuntu-import-blender-module/558685/3 "2012-12-06T04:13:32Z")

</div>

I want to run the code mentioned here : [http://blenderartists.org/forum/archive/index.php/t-175693.html](http://blenderartists.org/forum/archive/index.php/t-175693.html)

I think we can compile Blender as a python module. This allows us to access all the various shaders and depth buffers. I tried compiling blender as well (directions given here [http://wiki.blender.org/index.php/User:Ideasman42/BlenderAsPyModule](http://wiki.blender.org/index.php/User:Ideasman42/BlenderAsPyModule)). The compilation proceeds fine but it fails to give blender.so as one of module.

---

<div class="post-metadata">

**Author:** ![SimonKinane](https://blenderartists.org/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@SimonKinane](https://blenderartists.org/u/SimonKinane)\
**Post date:** [December 8, 2012, 12:20am UTC](https://blenderartists.org/t/ubuntu-import-blender-module/558685/4 "2012-12-08T00:20:41Z")

</div>

I’m working on blender as a python module as well  
in Ubuntu 12.10 - though I’m failing also.

It’s bpy.so you’re looking for.

Also when you’re running python, are you’re symbolic  
links pointing to the version where module is installed?

> ln -l /usr/bin |grep python  
> will give you info about the links

---

<div class="post-metadata">

**Author:** ![SimonKinane](https://blenderartists.org/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@SimonKinane](https://blenderartists.org/u/SimonKinane)\
**Post date:** [December 8, 2012, 12:42am UTC](https://blenderartists.org/t/ubuntu-import-blender-module/558685/5 "2012-12-08T00:42:14Z")

</div>

I’ve just discovered a solution:

run this:

> import sys  
> print(sys.path)

and you will get the directories where python is looking for modules.  
Make sure that the stuff listed in the manual install instructions are  
put in one of those directories.

PS: thanks dreamlax for helping me see the forest - I’ve been working on this for months!
