简体   繁体   中英

How to install wxPython 3.0.2.0 on Ubuntu 14.04?

I am trying to install wxPython from src as I need the exact version 3.0.2.0 on Ubuntu. (So, I cannot follow the suggesion in the related question ) I downloaded the source and did ./configure, make and make install. It seems to have ended without errors with the following message.

The installation of wxWidgets is finished. On certain platforms (eg Linux) you'll now have to run ldconfig if you installed a shared library and also modify the LD_LIBRARY_PATH (or equivalent) environment variable. wxWidgets comes with no guarantees and doesn't claim to be suitable for any purpose.

I confirmed my installation is not working by doing import wx & wx.version(). What needs to be done to complete the installation? Where should I set the LD_LIBRARY_PATH to?

Doing ./configure, make and make install only builds and installs wxWidgets. You also need to build wxPython using the build-wxpython.py script, which by default will also do the wxWidgets portion of the build for you, using known good configure flags. See wxPython/docs/BUILD.txt in the source tarball.

Try to check if wx is in sys.pah.

You can do it with this code

import sys
print sys.path

In output must be something like that /usr/lib/python2.7/dist-packages/wx

If not, adding path to wx folder to system path should solve your problem.

gtk3 should be install first

$sudo apt-get libgtk-3-dev

If you are facing problem to install wxpython on Python3 please use this command to install wxpython

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

By this command you can install latest wxPython4 version. If you are using Windows or macOS

$ pip install -U wxpython

Older Version you can get from this link https://sourceforge.net/projects/wxpython/files/wxPython/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM