나는이 게시물에 비슷한 문제에 봉착는 :pyInstaller 중에 및 PySide와 QtGui
Pyinstaller: ImportError: cannot import name QtGui
...하지만이 게시물은 해결책이 나타나지 않습니다. 나는 매우 간단 PySide 스크립트 (helloWorld.py)를 설치 pyInstaller 중에 사용할 수 없습니다 :
#!/usr/bin/python
import sys
from PySide import QtGui
from PySide import QtCore
app = QtGui.QApplication(sys.argv)
label = QtGui.QLabel("Hello Plain World")
label.show()
app.exec_()
sys.exit()
을 내가 실행
]$ ./makespec.py -F helloWorld.py
]$ pyinstaller helloWorld.Spec
생성하는이 성공적으로 실행 파일을 생성
fatal: Not a git repository (or any of the parent directories): .git
20 INFO: UPX is not available.
34 INFO: Processing hook hook-os
103 INFO: Processing hook hook-time
104 INFO: Processing hook hook-cPickle
156 INFO: Processing hook hook-_sre
245 INFO: Processing hook hook-cStringIO
308 INFO: Processing hook hook-encodings
316 INFO: Processing hook hook-codecs
599 INFO: Extending PYTHONPATH with /home/derek/BitBucketRepos/tmp/qvt/pyinstaller/tmp
599 INFO: checking Analysis
599 INFO: building Analysis because out00-Analysis.toc non existent
599 INFO: running Analysis out00-Analysis.toc
632 INFO: Analyzing /home/derek/BitBucketRepos/tmp/qvt/pyinstaller/PyInstaller/loader /_pyi_bootstrap.py
643 INFO: Processing hook hook-os
652 INFO: Processing hook hook-site
661 INFO: Processing hook hook-encodings
726 INFO: Processing hook hook-time
727 INFO: Processing hook hook-cPickle
780 INFO: Processing hook hook-_sre
871 INFO: Processing hook hook-cStringIO
939 INFO: Processing hook hook-codecs
1272 INFO: Processing hook hook-pydoc
1358 INFO: Processing hook hook-email
1398 INFO: Processing hook hook-httplib
1430 INFO: Processing hook hook-email.message
1476 INFO: Analyzing /home/derek/BitBucketRepos/tmp/qvt/pyinstaller/PyInstaller/loader /pyi_importers.py
1515 INFO: Analyzing /home/derek/BitBucketRepos/tmp/qvt/pyinstaller/PyInstaller/loader /pyi_archive.py
1542 INFO: Analyzing /home/derek/BitBucketRepos/tmp/qvt/pyinstaller/PyInstaller/loader /pyi_carchive.py
1570 INFO: Analyzing /home/derek/BitBucketRepos/tmp/qvt/pyinstaller/PyInstaller/loader /pyi_os_path.py
1573 INFO: Analyzing helloWorld.py
1575 INFO: Processing hook hook-PySide
1575 INFO: Hidden import 'codecs' has been found otherwise
1575 INFO: Hidden import 'encodings' has been found otherwise
1575 INFO: Looking for run-time hooks
objdump: section '.dynamic' mentioned in a -j option, but not found in any input file
2579 INFO: Using Python library /usr/lib/libpython2.7.so.1.0
2579 INFO: Adding Python library to binary dependencies
2964 INFO: Warnings written to /home/derek/BitBucketRepos/tmp/qvt/pyinstaller/tmp/build /helloWorld/warnhelloWorld.txt
2968 INFO: checking PYZ
2968 INFO: rebuilding out00-PYZ.toc because out00-PYZ.pyz is missing
2968 INFO: building PYZ (ZlibArchive) out00-PYZ.toc
3329 INFO: checking PKG
3329 INFO: rebuilding out00-PKG.toc because out00-PKG.pkg is missing
3329 INFO: building PKG (CArchive) out00-PKG.pkg
objdump: section '.dynamic' mentioned in a -j option, but not found in any input file
10614 INFO: checking EXE
10614 INFO: rebuilding out00-EXE.toc because helloWorld missing
10614 INFO: building EXE from out00-EXE.toc
10614 INFO: Appending archive to EXE /home/derek/BitBucketRepos/tmp/qvt/pyinstaller /tmp/dist/helloWorld
하지만, 내가 그것을 실행할 때 나는 다음과 같은 결과를 얻는다 :
Traceback (most recent call last):
File "<string>", line 4, in <module>
ImportError: cannot import name QtGui
내 시스템은 Linux Mint 15 (우분투 13.04)이며, PySide와 PySide-dev가 설치되어 있고 꽤 많이 사용되었다. pyinstaller 2.0을 사용하고있다.
어떤 도움이든지 크게 도움이 될 것입니다.
데릭
내가 함께 PySide 애플리케이션을 패키징 어떤 문제가 없었어요 [** 나 cx_Freeze **] (HTTP : // CX-동결. sourceforge.net/). –