PyQtDeploy出错

时间:2014-07-07 20:52:45

标签: pyqt5 pyqtdeploy

我正在使用PyQt 5.3.1并且我正在使用pyqtdeploy 0.4进行部署,当我想构建项目时,我收到此错误消息:

Generating code...
Cleaning E:\ProgramasPython3\PythonQT\QTCalculator\build.
Freezing C:\Users\Tobal\AppData\Local\Temp\bootstrap_py3.py
Freezing E:\ProgramasPython3\PythonQT\QTCalculator\qtcalculator.py
Freezing E:/ProgramasPython3/PythonQT\QTCalculator\__init__.py
Freezing E:/ProgramasPython3/PythonQT\QTCalculator\calculator_ui.py
Freezing E:/ProgramasPython3/PythonQT\QTCalculator\img_rc.py
Freezing E:/ProgramasPython3/PythonQT\QTCalculator\qtcalculator.py
Freezing C:\Python34\libs\site-packages\PyQt5\__init__.py
Unable to freeze C:\Python34\libs\site-packages\PyQt5\__init__.py.
Traceback (most recent call last):
  File "C:\Users\Tobal\AppData\Local\Temp\freeze.py", line 103, in <module>
    freeze_as_data(py_file, options.as_data)
  File "C:\Users\Tobal\AppData\Local\Temp\freeze.py", line 36, in freeze_as_data
    code = _get_marshalled_code(py_filename)
  File "C:\Users\Tobal\AppData\Local\Temp\freeze.py", line 71, in _get_marshalled_code
    source_file = open(py_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Python34\\libs\\site-packages\\PyQt5\\__init__.py'

我认为这是一个错误。有人确实知道如何解决它吗? 感谢

2 个答案:

答案 0 :(得分:1)

你是否静态构建了PyQt5?主机和目标Python是两个不同的东西,通常在不同的目录中。目标Python有静态构建的PyQt模块,主机Python也必须安装PyQt5(因为pyqtdeploy使用Qt作为其GUI),但它通常是主机Python中的动态库。

答案 1 :(得分:0)

在“位置”选项卡上的pyqtdeploy GUI中,确保“标准库目录”正确无误。