How to properly install wxPython? How to properly install wxPython? windows windows

How to properly install wxPython?


It's on PyPI. As of wxPython 4, Python 3 is supported.

Unfortunately, PyPI has a package called wx that is stuck at version 3.0.3; be sure to install the package named wxpython instead.

pip install wxpython

Please note that pip will automatically build wxWidgets for you, but it will not install wxWidgets system dependencies such as GTK and OpenGLu. If the above command exits with an error, look above for a message like this:

checking for <something>... not foundchecking for <something>... noconfigure: error: <prereq> libraries not availableError running configureERROR: failed building widgets

This should give you information about at least one of the packages your system is missing.

The "official" list of prerequisites from the wxWidgets source is:

  • dpkg-dev
  • build-essential
  • libjpeg-dev
  • libtiff-dev
  • libsdl1.2-dev
  • libgstreamer-plugins-base0.10-dev # or 1.0 if available
  • libnotify-dev
  • freeglut3
  • freeglut3-dev
  • libsm-dev
  • libgtk-3-dev
  • libwebkitgtk-3.0-dev # or libwebkit2gtk-4.0-dev if available
  • libxtst-dev

The actual package names provided by your package manager may not match these exactly, and to be honest, I don't really know the best way to query a package manager to determine what packages provide the libraries you need.


3 steps to install wx-widgets and pygame in python IDLE

  1. Install python 3xxx in your system opting (Add 3xxx to your path).
  2. open python CLI to see whether python is working or not.
  3. then open command prompt (CMD).
    • type PIP to see whether pip is installed or not.
  4. enter command : pip install wheel
  5. enter command : pip install pygame
  6. To install wxpython enter command : pip install -U wxPython

Thats all !!


As per home page instruction:

Make sure you have at least version 6.0.8 of pip and 12.0.5 for setuptools.

Install requirements for Linux as outlined in the readme.rst at:

    https://github.com/wxWidgets/Phoenix/blob/master/README.rst 

Install wxPython-Phoenix (Linux):

       sudo pip install --upgrade --trusted-host wxpython.org --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix 

Install wxPython-Phoenix (Windows, use the appropriate script folder):

       C:\python27\scripts\pip.exe install --upgrade  --trusted-host wxpython.org --pre -f http://wxpython.org/Phoenix/snapshot-builds/ wxPython_Phoenix