search

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:
wxPython-src-3.0.0.0/wxPython

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-wxpython.py --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-3.0.0.0-py2.7.egg-info /usr/lib64/python2.7/site-packages/wxPython_common-3.0.0.0-py2.7.egg-info


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-3.0.0.0/wxPython

And then:
- Run python demo/demo.py

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

Add it to PYTHONPATH:
export PYTHONPATH=$PYTHONPATH:"/home/jsn/app/wxPython-src-3.0.0.0/wxPython"


Check the demo:
python demo/demo.py



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

No comments:

Post a Comment