Reputation: 15
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
Upvotes: 1
Views: 923
Reputation: 14135
As stated, this might not be possible/easy. Check out this dialog for a similar problem with Tkinter and you might find some help on your quest, or find why it cannot be done. However note that bgui seems to be an alternative if e.g. you just want a gui with blender game engine.
Upvotes: 0
Reputation: 832
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.
Upvotes: 2