Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save rexissimus/f1a1aada7de1c00a57c7 to your computer and use it in GitHub Desktop.

Select an option

Save rexissimus/f1a1aada7de1c00a57c7 to your computer and use it in GitHub Desktop.

Revisions

  1. rexissimus created this gist Jan 14, 2016.
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,43 @@
    Building Python 3 with PyQt5, QWebEngine, QScintilla, VTK on Windows 64bit

    Install Visual C++ 2013 (I failed to get MingW working with PyQt5)
    Install the vs2013 version of Qt5
    Install Python 3.4 64bit

    Get sip (4.17), PyQt5 (5.5.1), and QScintilla sources

    Add path to qmake to PATH

    Open command prompt
    Set correct compiler
    > C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\vcvars64

    Configure sip:
    > C:\Python34\python.exe configure.py --platform=win32-vc2013
    > nmake
    > nmake install

    Configure PyQt5 (Disable QtPositioning and QtNfc):
    > C:\src\PyQt-gpl-5.5.1>C:\Python34\python.exe configure.py --sip=C:\Python34\sip.exe --disable=QtPositioning --disable=QtNfc
    > nmake
    > nmake install

    install qscintilla:
    http://pyqt.sourceforge.net/Docs/QScintilla2/

    VTK with Qt5
    download vtk 7.0 source (rc1 tested)
    install mingw with gfortran
    install cmake
    run cmake-gui on vtk source
    * check path to qmake
    * Select opengl backend (not opengl2)
    * enable python wrapper (version 3)
    Build and install VTK through visual studio 2013

    BUG: Running a vtk pyqt5 example triggers the __name__ == '__main__' section in qvtkrenderwindowinteractor.py. The example runs correctly when it is commented out

    ISSUES:
    Travis can only use precompiled binaries?
    * Skip QWebEngine tests
    * Skip VTK tests? (Needs VTK compiled for Python3/PyQt5)