Search code examples
pythonwxpython

Trying to install wxPython Phoenix for python 3


When I tried to install wx Phoenix via pip with this command

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

Well, after a long time trying to build it I get this error:

Command "/usr/local/bin/python3.4 -u -c "import setuptools, tokenize;
__file__='/tmp/pip-build-q1ih5z3f/wxPython-Phoenix/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" 
install --record /tmp/pip-wygy2a7y-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1
in /tmp/pip-build-q1ih5z3f/wxPython-Phoenix/

Anyone have the same problem? How I can fix this?


Solution

  • I suppose you are on a Unix plattform. In that case the command as entered by you will not find any wheel, download the source package and try to compile it. See in the README.txt what to do to get wxPython Linux wheels:

    Wheels for Linux
    ----------------
    
    Since there are various options for distro and wx port (GTK2 or GTK3) then the
    files can not all be located in the same folder like we can do for the Windows
    and OSX builds.  This just simply means that you'll need to drill down a
    little further to find the URL to give to pip.  For example, to get the GTK3
    Phoenix builds for Ubuntu 16.04 (and 16.10, LinuxMint 18, and probably others)
    you can use a pip command like this:
    
        pip install -U --pre \
            -f https://wxpython.org/Phoenix/snapshot-builds/linux/gtk3/ubuntu-16.04 \
            wxPython_Phoenix