0

I am newer to use wxPython, at first, I use command to pip install wxPython to install wxPyhton:

pip install -U wxPython Requirement already up-to-date: wxPython in c:\program files\python\python37\lib\site-packages (4.0.3) Requirement already satisfied, skipping upgrade: six in c:\program files\python\python37\lib\site-packages (from wxPython) (1.11.0) Requirement already satisfied, skipping upgrade: PyPubSub in c:\program files\python\python37\lib\site-packages (from wxPython) (4.0.0) 

Then I try to run this code to show a GUI window, and source from wxPyhton example:

# set_size.py import wx class Example(wx.Frame): def __init__(self, parent, title): super(Example, self).__init__(parent, title=title, size=(350, 250)) def main(): app = wx.App() ex = Example(None, title='Sizing') ex.Show() app.MainLoop() if __name__ == '__main__': main() 

But I got error `Undefined variable from import: Frame', what can I do next?

Traceback (most recent call last): File "C:\Users\zz250147\git\python\Scraping\prototype\set_size.py", line 6, in <module> import wx File "C:\Program Files\Python\Python37\lib\site-packages\wx\__init__.py", line 17, in <module> from wx.core import * File "C:\Program Files\Python\Python37\lib\site-packages\wx\core.py", line 12, in <module> from ._core import * ImportError: DLL load failed: Module not found. 

1 Answer 1

2

After installed Microsoft Visual C++ 2015 Redistributable Update 3, The error gone!

Sign up to request clarification or add additional context in comments.

1 Comment

I've been stuck with this issue for quite some time, and this solved my problem, thanks a lot!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.