最近我把我的Ubuntu升级到了11.10版本,所以我不得不重新安装python3模块。我下载了最新的PyQt4,但当我运行configure.py时,我得到以下错误:
Qt Designer plugin disabled because Python library couldn't be found
An internal error occured. Please report all the output from the program,
including the following traceback, to support@riverbankcomputing.com.
Traceback (most recent call last):
File "configure.py", line 2269, in <module>
main()
File "configure.py", line 2254, in main
subdirs=pyqt.qpy_libs() + pyqt_modules + xtra_modules + pyqt.tools(),
File "configure.py", line 957, in tools
link = "%s -lpython%d.%d%s" % (lib_dir_flag, py_major, py_minor, abi)
UnboundLocalError: local variable 'lib_dir_flag' referenced before assignment我真的一点也不知道出了什么问题。顺便说一句。在我将Ubuntu升级到11.10之前,我使用的是python3.1,一切都很好。
发布于 2011-11-07 01:23:35
在尝试构建PyQt4之前,请确保安装了正确的sip包。对于ubuntu,我认为您将需要python-sip-dev和python3-sip-dev包(以及所有依赖包)。或者,您可以从源代码下载并构建latest version of sip。
在运行pyqt或sip的configure.py脚本时,必须使用正确的python版本,例如:
/usr/bin/python3.2 configure.pyhttps://stackoverflow.com/questions/8028269
复制相似问题