No Module named wx

49 views
Skip to first unread message

srfpala

unread,
Apr 4, 2018, 8:54:58 PM4/4/18
to PyScripter

Date:  4/4/2018 
On Win 7 : Running PyScripter Version 3.3.1.0 x86

*** Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)] on win32.

and  wxPython is at  d:\Python36 > wxPython > site-packages > wx-2.8-msw-unicode > wxPython

and in the PyScripter Python paths I add D:\Python36\wxPython\site-packages

and when I run I get

Error   ModuleNotFound No Module named wx

And D:\Python36\wxPython\site-packages disappears from the list


What is wrong ?
What should I do ?




PyScripter

unread,
Apr 4, 2018, 9:50:57 PM4/4/18
to PyScripter
The Tools, Python Path is primarily an easy way of viewing the path. Changes to it are not persisted (saved).  When you run your script, by default the Python Engine is re-initialized and the changes to the path are lost.  You need to add the wx path to the python path in some other way:

-  See this for general ways
-  The Pyscripter way would be to select Tools, Edit Start-up Scripts and add the following lines to python_init.py
import sys
sys.path += ["your path"]
Reply all
Reply to author
Forward
0 new messages