How can I install wxPython 3.0.1.1 in Python 2.7 virtualenv on Ubuntu 14.10?

Hi all,

I have found a number of suggestions for installing wxPython in a virtualenv, but none seem to fit my environment exactly. (And suggested solutions/workarounds don’t apply or don’t work.) How can I install wxPython 3.0.1.1 in Python 2.7 virtualenv on Ubuntu 14.10?

What I’ve tried so far:

1. Create and activate virtualenv 2. ./configure --prefix=/home/username/.virtualenvs/test 3. make install

4. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.virtualenvs/test/lib
5. cd wxPython
6. python setup.py install

I suspect step 4 is not required. All steps seem to work until step 6 which seems to arbitrarily fail on:

src/gtk/_core_wrap.cpp:20474:7: note: ‘arg3’ was declared here
int arg3 ;
       ^
cc1plus: some warnings being treated as errors
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Am I missing something and/or is there anything else I can do to pin down the error?

I've posted a slightly more detailed summary at https://stackoverflow.com/questions/27401931 - feel free to answer there (I'll update there once resolved either way).

any reason you didn’t use build-wxpython.py as shown here:

?

That is how I built from source about 2 months ago, though I have never used a virtualenv.

···

On Wednesday, December 10, 2014 6:11:57 AM UTC-8, David Seaward wrote:

Hi all,

I have found a number of suggestions for installing wxPython in a virtualenv, but none seem to fit my environment exactly. (And suggested solutions/workarounds don’t apply or don’t work.) How can I install wxPython 3.0.1.1 in Python 2.7 virtualenv on Ubuntu 14.10?

What I’ve tried so far:

1. Create and activate virtualenv 2. ./configure --prefix=/home/username/.virtualenvs/test 3. make install

Hi Nathan,

any reason you didn’t use build-wxpython.py as shown here:
http://www.wxpython.org/BUILD.html

That’s a good point, and FWIW it looks like that should be doable, first activating the virtualenv, then invoking the build (using the virtualenv’s python and --prefix to ensure wxPython is installed into the ve and not on the system).

However, I discovered (mainly due to help from a colleague) that the problem was in fact hardening-wrapper triggering C compilation flags that caused the wxPython compilation to fail. Invoking:

CFLAGS=-Wno-error=format-security CPPFLAGS=-Wno-error=format-security python setup.py install

to override the flags solved the problem.

More details at http://stackoverflow.com/a/27419423/236081

Thanks again,
David

···

On Wednesday, December 10, 2014 7:32:13 PM UTC+2, Nathan McCorkle wrote: