wxPython and PyScripter

61 views
Skip to first unread message

srfpala

unread,
Nov 30, 2017, 3:30:51 PM11/30/17
to PyScripter
A very simple wxPython example runs cleanly in Idle 2.7.12  under Win10
But when I try the same App in PyScripter the 
ModuleNotFoundError: No module named 'wx'   error is generated
Code follows:
def main():
    pass
if __name__ == '__main__':
    main()
import wx
print ("New wxPython3.0-py27  Install Pass 04 ")
app = wx.App(redirect=True)
top = wx.Frame(None, title="Hello World Pass 04", size=(300,200))
top.Show()
app.MainLoop()
# ------------------  End of Code ----------------
Apparently PyScripter needs something that IDLE  doesn't
Must be missing a setting. Any ideas are appreciated.
Bob

Kiriakos Vlahos

unread,
Nov 30, 2017, 5:31:36 PM11/30/17
to pyscr...@googlegroups.com
Hi Bob,

PyScripter does not require anything more than IDLE.  Probably PyScripter is using a different version of python than Idle  than PyScripter and wx is not installed in that version of Python.

When you start either IDLE or PyScripter you see something like this.

Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32

Do the versions in PyScripter and IDLE much?

You can use PyScripter with different versions of Python using the provided shortcuts (e.g. PyScripter for Python x.x) or by using command-line options such as --PYTHON27

Regards
Kiriakos

--
You received this message because you are subscribed to the Google Groups "PyScripter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyscripter+unsubscribe@googlegroups.com.
To post to this group, send email to pyscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/pyscripter.
For more options, visit https://groups.google.com/d/optout.

Bob Palank

unread,
Dec 2, 2017, 4:55:28 PM12/2/17
to pyscr...@googlegroups.com
Thanks for your reply.
Using IDLE I see:
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22)
[MSC v.1500 32 bit (Intel)] on win32
Python version 2.7.12 and IDLE Ver 2.7.12

Using Pyscripter The Python Interpreter dialog shows:
 Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) 
[MSC v.1900 64 bit (AMD64)] on win32.

Before I do any guessing, I'll await your reply.

Thanks in advance for your attention.
Bob


--
You received this message because you are subscribed to a topic in the Google Groups "PyScripter" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyscripter/_0U9InzbjFI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyscripter+unsubscribe@googlegroups.com.

Kiriakos Vlahos

unread,
Dec 2, 2017, 7:52:31 PM12/2/17
to pyscr...@googlegroups.com
Hi Bob,
As the note at the download page says:
"The 64-bit version of PyScripter (x64) works only on 64-bit Windows **and**
with 64-bit versions of Python.  The 32-bit version of PyScripter works on both
32-bit and 64-bit Windows with the 32-bit versions of Python.".

Apparently in your machine you have at least two versions of Python installed. A 32bit version of Python 2.7 used by IDLE and a 64 bit version of python 3.6 picked up by the 64-bit version of PyScripter you are using.

To work with the 32bit version of python from PyScripter you need to download and install the 32-bit version of PyScripter. This can be installed side-by-side with the 64 bit version. You then use the PyScripter created shortcuts of the 32bit PyScripter (e.g. PyScripter for Python 2.7) to load 32bit Python 2.7.

Hope this helps.

Regards
Kiriakos 

Bob Palank

unread,
Dec 3, 2017, 5:02:36 PM12/3/17
to pyscr...@googlegroups.com
Great job and hanks again. Up and running just fine !
Bob
Reply all
Reply to author
Forward
0 new messages