Sunday, April 20, 2014

fedora 20: How to install wxPython 3.0.0

The latest version of the wxPython package from official fedora repo is 2.8. That is why we need to install it from source.

Extract compressed file and switch to that folder:

Install required dependencies:
sudo yum install gcc-c++ wxGTK-devel gstreamer-devel webkitgtk-devel GConf2-devel gstreamer-plugins-base-devel

Let's start installiation process:
sudo python --build_dir=../bld --install --unicode

I received an error about unsuccessful creation of the path file. As I understood the problem is that all files were installed to folder /usr/lib64/.., but path file to folder /usr/lib/..

Let's create links to path files (not sure if it really required):

cd /usr/lib/python2.7/site-packages
sudo ln -s wx.pth /usr/lib64/python2.7/site-packages/wx-3.0-gtk2.pth
sudo ln -s wx.pth /usr/lib64/python2.7/site-packages/wx.pth
sudo ln -s wxPython_common- /usr/lib64/python2.7/site-packages/wxPython_common-

At the end of installation process I received a message:
To run the wxPython demo you may need to:
- set your PYTHONPATH variable to /home/jsn/app/wxPython-src-

And then:
- Run python demo/

/home/jsn/app/wxPython-src- - folder from which we installed package.

export PYTHONPATH=$PYTHONPATH:"/home/jsn/app/wxPython-src-"

Check the demo:
python demo/

To add wxPython to PYTHONPATH permanently, edit file:
cd ~
vim .bash_profile

No comments:

Post a Comment