2012-05-21 3 views
2

Qt 생성자를 사용하여 PythonQt을 컴파일하려고하는데 163 오류가 발생합니다.Qt 생성자로 PythonQt 컴파일

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

및 이와 같은 다른 디렉토리.

나는 파이썬 3.2을 설치하고 내가 할 PRF 파일을 변경 한이 :

# 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) 
} 

내가 바로 하지만 같은 오류를 오전이 build link에 따라! 내가 = 미리 감사 문제 무엇인지 모르는

답변

3

) page about building it이 Python3 테스트 및 일부 변경이 요구 될 수 있음을하지 않은 말했다. 그것은 거의 확실하게 당신이보고있는 문제입니다.

확실히 찾으려면 Python 2.6 또는 2.7을 다시 시도하십시오. 빌드가 작동하면 163 개의 오류는 Python2/Python3 호환성 변경으로 인한 것일 수 있습니다.

파이썬 3을 사용해야하는 경우 오류를 수정하는 것이 유일한 옵션입니다. 그렇지 않으면 Python 2.7을 사용하는 것이 더 쉽습니다.

Python3 빌드 문제를 해결하기로 결정했다면 패치를 제출하면 좋을 것입니다 :-)

관련 문제