How to access pywin32 modules from Blender?

I’m a newbie with Blender & Python, but have successfully built some models with Blender. Now I want to import data from an Excel spreadsheet to control the placement of some elements. I have installed Python 2.4.2 and pywin32. I have run the standalone Python interpreter and have verified that win32com is installed and callable.

I have added c:\python24\lib\site-packages to my PYTHONPATH.
When I execute a script that begins with

import win32com.client

, Blender reports that there is no win32com module.

How do I configure Blender to find modules in the site-packages directory?

I have installed Python 2.4.2 and pywin32

There is your problem. Blender uses Python 2.3 ( at least until the next version comes out).

Install Python 2.3 and whatever modules you need for that version. You may need to set PYTHONPATH to see the additional modules.

My newbie solution to this and other similar related problems was to install Blender 2.37a and 2.4 alpha2 plus Python 2.3 and 2.4.

Its clumsy but at least I can get everything to work now.

Thanks - uninstalling Python 2.4 and installing Python 2.3 & the corresponding Pywin32 did the trick!

– Peter

hi, how exactlly do you import excel data to blender?
I’m pretty interested about that :slight_smile:

I recommend taking a look at the CSV File importer discussed in the thread:
http://blenderartists.org/forum/showthread.php?t=103587

It is probably easier than accessing Excel directly using pywin32.