tall978 פורסם 2014 ביולי 1 Share פורסם 2014 ביולי 1 שלום.אני מנסה להמיר סקריפט שכתבתי בפייתון לקובץ EXE עצמאי ואני נתקל בבעיות בנושא.הסקריפט שהכנתי מכיר גם ממשק בTkinter לכן חשוב לי להמיר אותו לקובץ עצמאימשיטוט שלי ברשת מצאתי את הכלי בשם Pyinstaller שממיר את הקוד לקובץ EXE אולם כשניסיתי להשתמש בו אני נתקל בבעיות ולא מצליח לסיים את הפעולה.הכלי יוצר לי תיקיה חדשה בשם של הקובץ py שאני מעוניין אבל לא מקמפל את כל הקבצים שהכין לקובץ אחד ויחיד.אשמח לשמוע האם למישהו יש עצה בנושא או כלי אחר שמבצע את מה שאני רוצה.הקוד שלי מכיר קובץ אחד ויחיד עם סיומת PY ובתוכו מספר פונקציות.תודה מראש. קישור לתוכן שתף באתרים אחרים More sharing options...
שניצל פורסם 2014 ביולי 1 Share פורסם 2014 ביולי 1 זה אמור לעבוד, השאלה היא איך הרצת אותו ואיזו שגיאה קיבלת. קישור לתוכן שתף באתרים אחרים More sharing options...
tall978 פורסם 2014 ביולי 2 מחבר Share פורסם 2014 ביולי 2 הרצתי בצורה הפשוטה ביותר, הנחתי את התיקיה של pyinstaller-2.1 בתיקיה הראשית של פייתון בכונן C, העברתי לתיקיה הזאת את הסקריפט עם סיומת PY , הרצתי את הפקודה pyinstaller.py -F myscript.py וקיבלתי תיקיה באותו השם עם קובץ myscript.spec ועוד תיקיה בשם build. ולא קובץ אחד.C:\Python27\PyInstaller-2.1>pyinstaller.py -F final.py32 INFO: wrote C:\Python27\PyInstaller-2.1\final\final.spec55 INFO: Testing for ability to set icons, version resources...62 INFO: ... resource update available64 INFO: UPX is not available.94 INFO: Processing hook hook-os237 INFO: Processing hook hook-time244 INFO: Processing hook hook-cPickle325 INFO: Processing hook hook-_sre469 INFO: Processing hook hook-cStringIO590 INFO: Processing hook hook-encodings610 INFO: Processing hook hook-codecs1107 INFO: Processing hook hook-httplib1115 INFO: Processing hook hook-email1247 INFO: Processing hook hook-email.message1508 WARNING: library python%s%s required via ctypes not found1641 INFO: Processing hook hook-xml1725 INFO: Processing hook hook-xml.sax1761 INFO: Processing hook hook-pyexpat1856 INFO: Extending PYTHONPATH with C:\Python27\PyInstaller-2.11857 INFO: checking Analysis1857 INFO: building Analysis because out00-Analysis.toc non existent1858 INFO: running Analysis out00-Analysis.toc1859 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable1950 INFO: Searching for assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_none ...1951 INFO: Found manifest C:\Windows\WinSxS\Manifests\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91.manifest1953 INFO: Searching for file msvcr90.dll1954 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcr90.dll1954 INFO: Searching for file msvcp90.dll1955 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcp90.dll1955 INFO: Searching for file msvcm90.dll1957 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_bcb86ed6ac711f91\msvcm90.dll2063 INFO: Analyzing C:\Python27\PyInstaller-2.1\PyInstaller\loader\_pyi_bootstrap.py2080 INFO: Processing hook hook-os2097 INFO: Processing hook hook-site2120 INFO: Processing hook hook-encodings2263 INFO: Processing hook hook-time2266 INFO: Processing hook hook-cPickle2353 INFO: Processing hook hook-_sre2511 INFO: Processing hook hook-cStringIO2661 INFO: Processing hook hook-codecs3210 INFO: Processing hook hook-httplib3217 INFO: Processing hook hook-email3359 INFO: Processing hook hook-email.message3686 WARNING: library python%s%s required via ctypes not found3809 INFO: Processing hook hook-xml3886 INFO: Processing hook hook-xml.sax3921 INFO: Processing hook hook-pyexpat4040 INFO: Processing hook hook-pydoc4109 INFO: Analyzing C:\Python27\PyInstaller-2.1\PyInstaller\loader\pyi_importers.py4316 INFO: Analyzing C:\Python27\PyInstaller-2.1\PyInstaller\loader\pyi_archive.py4510 INFO: Analyzing C:\Python27\PyInstaller-2.1\PyInstaller\loader\pyi_carchive.py4700 INFO: Analyzing C:\Python27\PyInstaller-2.1\PyInstaller\loader\pyi_os_path.py4712 INFO: Analyzing final.py4792 INFO: Processing hook hook-_tkinter4957 INFO: checking Tree4958 INFO: building because out00-Tree.toc missing or bad4958 INFO: building Tree out00-Tree.toc5246 INFO: checking Tree5247 INFO: building because out01-Tree.toc missing or bad5248 INFO: building Tree out01-Tree.toc5471 INFO: Hidden import 'codecs' has been found otherwise5472 INFO: Hidden import 'encodings' has been found otherwise5475 INFO: Looking for run-time hooks5477 INFO: Analyzing rthook C:\Python27\PyInstaller-2.1\PyInstaller\loader\rthooks\pyi_rth_Tkinter.py6609 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable6717 INFO: Using Python library C:\Windows\system32\python27.dll6836 INFO: Warnings written to C:\Python27\PyInstaller-2.1\final\build\final\warnfinal.txt6847 INFO: checking PYZ6848 INFO: rebuilding out00-PYZ.toc because out00-PYZ.pyz is missing6849 INFO: building PYZ (ZlibArchive) out00-PYZ.toc8182 INFO: checking PKG8184 INFO: rebuilding out00-PKG.toc because out00-PKG.pkg is missing8184 INFO: building PKG (CArchive) out00-PKG.pkgTraceback (most recent call last): File "C:\Python27\PyInstaller-2.1\pyinstaller.py", line 18, in <module> run() File "C:\Python27\PyInstaller-2.1\PyInstaller\main.py", line 88, in run run_build(opts, spec_file, pyi_config) File "C:\Python27\PyInstaller-2.1\PyInstaller\main.py", line 46, in run_build PyInstaller.build.main(pyi_config, spec_file, **opts.__dict__) File "C:\Python27\PyInstaller-2.1\PyInstaller\build.py", line 1924, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "C:\Python27\PyInstaller-2.1\PyInstaller\build.py", line 1873, in build execfile(spec) File "C:\Python27\PyInstaller-2.1\final\final.spec", line 17, in <module> console=True ) File "C:\Python27\PyInstaller-2.1\PyInstaller\build.py", line 1170, in __init__ strip_binaries=self.strip, upx_binaries=self.upx, File "C:\Python27\PyInstaller-2.1\PyInstaller\build.py", line 1008, in __init__ self.__postinit__() File "C:\Python27\PyInstaller-2.1\PyInstaller\build.py", line 309, in __postinit__ self.assemble() File "C:\Python27\PyInstaller-2.1\PyInstaller\build.py", line 1069, in assemble archive.build(self.name, mytoc) File "C:\Python27\PyInstaller-2.1\PyInstaller\loader\pyi_archive.py", line 217, in build self._finalize() File "C:\Python27\PyInstaller-2.1\PyInstaller\loader\pyi_carchive.py", line 190, in _finalize self.save_toc(toc_pos) File "C:\Python27\PyInstaller-2.1\PyInstaller\loader\pyi_carchive.py", line 351, in save_toc tocstr = self.toc.tobinary() File "C:\Python27\PyInstaller-2.1\PyInstaller\loader\pyi_carchive.py", line 85, in tobinary nmlen + entrylen, dpos, dlen, ulen, flag, typcd, nm + pad))struct.error: argument for 's' must be a string קישור לתוכן שתף באתרים אחרים More sharing options...
שכיר חרב פורסם 2014 ביולי 2 Share פורסם 2014 ביולי 2 אתה יכול לנסות גם את py2exe. קישור לתוכן שתף באתרים אחרים More sharing options...
tall978 פורסם 2014 ביולי 2 מחבר Share פורסם 2014 ביולי 2 זאת הייתה המחשבה הראשונה אבל py2exe לא תומך בגרסה 2.7 של פייתון שאני עובד בה קישור לתוכן שתף באתרים אחרים More sharing options...
Recommended Posts
ארכיון
דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.