I’m trying to import wxPython in my Blender game engine but getting error :
python code (in blender):
import bge
import wx
app = wx.App()
frame = wx.Frame(None, -1, 'frame in blender')
frame.Show()
app.MainLoop()
Error :-
Traceback (most recent call last):
File "Text", line 2, in <module>
ImportError: No module named wx
I googled about this error, but found nothing usefull..
also,i copied wx directory from python’s lib installation directory to the blender’s lib directory.
after that, i got error:-
Traceback (most recent call last):
File "Text", line 2, in <module>
File "C:\Program Files\Blender Foundation\Blender\2.64\python\lib\wx\__init__.py", line
14, in <module>
import __version__
ImportError: No module named __version__
please, help me!!
system details :-
os: windows 7
blender version : 2.64a
wxPython version : 2.8
That’s because Blender delivers a built-in version of the python interpreter.
You can probably solve this working on another way for importing the module.
I should also remind that the Blender Game Engine is extremely old for the biggest part, many OpenGL calls are really really really old and deprecated ( it’s based on a fixed pipeline behaviour ), I wouldn’t consider the game engine for any “serious” application of any kind. Blender itself is a good application, the game engine it’s not.