Hello All,
I installed wxPython 3.0 on a standard Python 2.7.6 installation 64bit. After wxPython 3.0, I check if cairo dll’s are installed.
Then I proceed to the installation of the demo, but cairo demos don’t work. Demo raises a RuntimeError, “Unable to find the Cairo shared library”. (see attached picture)
I tried to research the problem a little bit. Inside module wx.lib.wxcairo, in function _findCairoLib and after following the calls to ctypes , it seems
that the function ctypes.util.find_library is unable to find the installed libcairo-2.dll (which is installed in C:\Tools\Python27\Lib\site-packages\wx-3.0-msw\wx) because the path is not in the environment variable %PATH%. In the command line I try set PATH=%PATH%;C:\Tools\Python27\Lib\site-packages\wx-3.0-msw\wx. Then I open a python interpreter and I can assure ctypes.util.find_library(“libcairo-2”) returns the correct path to file C:\Tools\Python27\Lib\site-packages\wx-3.0-msw\wx\libcairo-2.dll, but the ctypes.CDLL(previous_path_with_file) returns the following error message:
Traceback (most recent call last):
File “”, line 1, in
File “C:\Tools\Python27\lib\ctypes_init_.py”, line 365, in init
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 193] %1 is not a valid Win32 application
Now I’m stuck! My platform is Windows 8.1, Python 2.7.6 64bit, wxpython-3.0-64bit. All builds are standard builds for the Internet.
Any help would be greatly appreciated,
Costis Hatzopoulos,
Structural Engineer