1

I have to install wxPython.

I have,

  • Ubuntu 18.10
  • python version: Python 3.7.3
  • pip3 version: pip 19.0.3

from /usr/local/lib/python3.7/site-packages/pip (python 3.7) I run command,

pip3 install wxPython 

it through the following errors:

Checking for /tmp/pip-install-mjeu3aw7/wxpython/bin/waf-2.0.8... "/usr/local/bin/python3.7" /tmp/pip-install-mjeu3aw7/wxpython/bin/waf-2.0.8 --wx_config=/tmp/pip-install-mjeu3aw7/wxpython/build/wxbld/gtk3/wx-config --gtk3 --python="/usr/local/bin/python3.7" --out=build/waf/3.7/gtk3 configure build Setting top to : /tmp/pip-install-mjeu3aw7/wxpython Setting out to : /tmp/pip-install-mjeu3aw7/wxpython/build/waf/3.7/gtk3 Checking for 'gcc' (C compiler) : /usr/bin/gcc Checking for 'g++' (C++ compiler) : /usr/bin/g++ Checking for program 'python' : /usr/local/bin/python3.7 Checking for python version >= 2.7.0 : 3.7.3 python-config : /usr/local/bin/python3.7-config Asking python-config for pyembed '--cflags --libs --ldflags' flags : yes Testing pyembed configuration : yes Asking python-config for pyext '--cflags --libs --ldflags' flags : yes Testing pyext configuration : Could not build python extensions The configuration failed (complete log in /tmp/pip-install-mjeu3aw7/wxpython/build/waf/3.7/gtk3/config.log) Command '"/usr/local/bin/python3.7" /tmp/pip-install-mjeu3aw7/wxpython/bin/waf-2.0.8 --wx_config=/tmp/pip-install-mjeu3aw7/wxpython/build/wxbld/gtk3/wx-config --gtk3 --python="/usr/local/bin/python3.7" --out=build/waf/3.7/gtk3 configure build ' failed with exit code 1. Finished command: build_py (0.852s) Finished command: build (2m51.322s) Command '"/usr/local/bin/python3.7" -u build.py build' failed with exit code 1.

---------------------------------------- Command "/usr/local/bin/python3.7 -u -c "import setuptools, tokenize;file='/tmp/pip-install-mjeu3aw7/wxpython/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-o0jpf739/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-mjeu3aw7/wxpython/

Can anybody give me the exact installation working solutions or how to proceed?

Thanks in advance.

1 Answer 1

5

wxPython does not natively support wheels building for Linux.

If you're on Ubuntu, try the following according to their documentation:

pip install -U \ -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 \ wxPython 

If you're not on any of the supported extras or the above doesn't work, you'll have to build it yourself according to their directions on their Downloads page.

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

4 Comments

I am using Ubuntu 18.10.
@2017kamb try the wheels at https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04
I just replace pip with pip3 since I am using python 3.7
In case you do want to build your own wheels on Linux there is some info about that here: wxpython.org/blog/2017-08-17-builds-for-linux-with-pip

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.