[Bf-python] sys.path problem

Stephen Swaney sswaney at swbell.net
Fri Nov 12 04:35:20 CET 2004


"www.stani.be" wrote:
> 
> Hi,
> It looks like Blender doesn't take in account the .pth
> files. For example I have wx.pth in lib/site-packages
> but "import wx" fails. The problem is that this
> prevents SPE from starting up. I quick-fixed it like
> this:
> 
> >import sys,os
> >site_packages   =
> os.path.join(sys.prefix,'Lib','site-packages')
> >wx_pth          =
> os.path.join(site_packages,'wx.pth')
> >if os.path.exists(wx_pth):
> 
> sys.path.append(os.path.join(sys.prefix,'Lib','site-packages',open(wx_pth).read()))
> 
> But a more generic solution inside Blender would be
> better of course, so that Blender in future takes .pth
> files in account.

Known bug.  Already in the Tracker.
Workaround is to use PYTHONPATH env var to prepend paths.
-- 
Stephen Swaney			
sswaney at swbell.net



More information about the Bf-python mailing list