Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Compiling PythonQt with Qt creator
Forum Updated to NodeBB v4.3 + New Features

Compiling PythonQt with Qt creator

Scheduled Pinned Locked Moved Language Bindings
2 Posts 2 Posters 4.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ahmed kato
    wrote on last edited by
    #1

    I am trying to compile "PythonQt":http://pythonqt.sourceforge.net/ using Qt creator but it return me 163 errors.

    bq. C:\Users\Kato\Desktop\Qt projects\PythonQt-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug\src....\PythonQt2.0.1\src\PythonQtStdDecorators.h:46: error: Python.h: No such file or directory

    and such other directories.

    I have python 3.2 installed and I have changed prf file to be:
    @# profile to include and link Python

    Change this variable to your python version (2.5, 2.6)

    win32:PYTHON_VERSION=32
    unix:PYTHON_VERSION=2.6

    macx {

    for macx you need to have the Python development kit installed as framework

    INCLUDEPATH += /System/Library/Frameworks/Python.framework/Headers
    LIBS += -F/System/Library/Frameworks -framework Python
    } else:win32 {

    for windows install a Python development kit or build Python yourself from the sources

    Make sure that you set the environment variable PYTHON_PATH to point to your

    python installation (or the python sources/header files when building from source).

    Make sure that you set the environment variable PYTHON_LIB to point to

    the directory where the python libs are located.

    When using the prebuild Python installer, this will be:

    set PYTHON_PATH = c:\Python26

    set PYTHON_LIB = c:\Python26\libs

    PYTHON_PATH= C:\Python32
    PYTHON_LIB= C:\Python32\libs

    When using the python sources, this will be something like:

    set PYTHON_PATH = c:\yourDir\Python-2.6.1\

    set PYTHON_LIB = c:\yourDir\Python-2.6.1\PCbuild8\Win32

    check if debug or release

    CONFIG(debug, debug|release) {
    DEBUG_EXT = _d
    } else {
    DEBUG_EXT =
    }

    win32:INCLUDEPATH += $(PYTHON_PATH)/PC $(PYTHON_PATH)/include
    win32:LIBS += $(PYTHON_LIB)/python$${PYTHON_VERSION}$${DEBUG_EXT}.lib

    } else:unix {

    on linux, python-config is used to autodetect Python.

    make sure that you have installed a matching python-dev package.

    unix:LIBS += $$system(python$${PYTHON_VERSION}-config --libs)
    unix:QMAKE_CXXFLAGS += $$system(python$${PYTHON_VERSION}-config --includes)
    }
    @
    according to this "build link":http://pythonqt.sourceforge.net/Building.html I am right
    but same errors !!
    I don't know what is the problem
    thank you in advance =)

    Ahmed Kato
    Computer & communications student
    Intern and MSP at Microsoft

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Ramaswamy
      wrote on last edited by
      #2

      It is neccessary to run qmake (Build -> Run qmake) after every change, i could be environment variables or any qt project files like prf...

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved