pollaris
pollaris

Reputation: 1321

how to install wxpython to visual studio 2017

I have installed python 3 and wxpython. Programs with

import wx

work when executed from the command line:

python helloworld.py

When I run the program with Visual Studio 2017, I get a build error:

ModuleNotFoundError: No module named 'wx' 

My python environment is set to python 3. I don't understand how to include the wx module.

Upvotes: 1

Views: 2963

Answers (1)

pollaris
pollaris

Reputation: 1321

wxpython needs to be installed to Visual Studio:

In your project, under "Python Environments", right click on your python installation e.g. Python 3.6. In the dropdown menu, click on "install python package...".

Then select "install wxpython" from the list. Results are displayed in the output window. Wait for the install to complete i.e. wait for the green progress bar indicator to finish.

Upvotes: 1

Related Questions