0

I am trying to migrate my projects from Python 2.7.12 to Python 3.5.2. (That is the right thing to do; isn't it?)

I do understand that getting wxPython to work in virtualenv can be a problem, but it works fine on Python 2 if I use this command to create the environment:

virtualenv env --system-site-packages

For Python 3, I use:

virtualenv -p python3 env --system-site-packages

But (as expected) this doesn't pick up wxPython

wxPython is installed at:

/usr/lib/python2.7/dist-packages

but, of course, in

/usr/lib/python3/dist-packages

There is no wxPython.

What do I need to do to use it in my Python 3 environment?

I have entered my virtualenv environment and ran:

pip install -U wxPython

as recommended here, but I get all these error messages

5
  • 1
    You need to install wxpython phoenix (wxpython 4.x.x) wxpython.org/pages/downloads/index.html (Note installation references to pip should be pip3 at least on my Linux box) Commented Oct 15, 2017 at 16:12
  • 1
    @RolfofSaxony Inside a virtualenv it can be just pip because there is only 1 pip. Outside of virtualenv it must be pip3. Also I think your comment should be an answer for the OP to accept it. Commented Oct 15, 2017 at 16:44
  • I tried pip install -U wxPython from within the Python 3 environment, but if fails with a build error Commented Oct 15, 2017 at 17:00
  • Would you care to elucidate? Commented Oct 16, 2017 at 7:58
  • @RolfofSaxony See my edited Question Commented Oct 16, 2017 at 11:22

1 Answer 1

2

You appear not to have gtk3 installed on your system.
I made a similar mistake when I built the gtk3 version of wxpython and expected it to look the same as gtk2 it doesn't!
Either install gtk3 or see this Has wxpython SpinCtrl/SpinButton changed between Classic and Phoenix? which how I installed and built wxpython 4.0.0b2 for gtk2 on Linux (there's always a caveat)

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.