WooW
Ağustos 21, 2019, 1:56ös
1
Arkadaşlar neden aynı anda 2 kere çalışıyor?
fiRE
Ağustos 22, 2019, 1:25öö
2
Kendi derlediğiniz bir program mı bu? Eğer öyleyse hangi modül ile derlediniz?
WooW
Ağustos 22, 2019, 5:29öö
3
Evet kendi derledigim program.Pyinstaller ile derledim.
Kullandigim komut:
pyinstaller --onefile --noconsole giris.py
Exe dosyasını ve exe haline getirdiğiniz py dosyasını paylaşabilir misiniz?
WooW
Ağustos 22, 2019, 11:51öö
5
Hangi py dosyasini derlesem sonuc ayni.
Exe ve spec dosyalarini paylasabilir misiniz?
WooW
Ağustos 23, 2019, 3:06ös
7
Paylaştığınız dosya açılmadı.
WooW
Ağustos 23, 2019, 3:21ös
9
arka planda çalışıyor.görev yöneticisnden bakabilirsin.
WooW
Ağustos 23, 2019, 3:22ös
10
kaynak kodu:
import time
while True:
time.sleep(101010)
break
test amaçlı yazmıştım.
Hmm, evet fark ettim.
opened 12:12PM - 05 Mar 17 UTC
closed 05:03PM - 05 Mar 17 UTC
kind:support
Hi all,
I just write a small python program and i use pyinstaller to generate a… n "exe" file.
But when i run this exe file, i find that there are two process instance in the task contoller.
My OS is Windows.
I use commad `pyinstaller.exe -F main.py -n main_1.1.1` to generate the "exe" file, here is the log:
```
Administrator@iZ11ek57bvfZ MINGW32 /d/qrcode (master)
$ pyinstaller.exe -F main.py -n main_1.1.1
135 INFO: PyInstaller: 3.2.1
135 INFO: Python: 2.7.12
136 INFO: Platform: Windows-7-6.1.7601-SP1
136 INFO: wrote D:\qrcode\main_1.1.1.spec
139 INFO: UPX is not available.
140 INFO: Extending PYTHONPATH with paths
['D:\\qrcode', 'D:\\qrcode']
140 INFO: checking Analysis
146 INFO: Building because D:\qrcode\main.py changed
146 INFO: Initializing module dependency graph...
149 INFO: Initializing module graph hooks...
205 INFO: running Analysis out00-Analysis.toc
209 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable
required by c:\python27\python.exe
302 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_60a5df56e60dc5df.manifest
303 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_8550c6b5d18a9128.manifest
304 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_f47ed0f6f6564d90.manifest
305 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_f480bfaef65491a5.manifest
398 INFO: Searching for assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_none ...
398 INFO: Found manifest C:\Windows\WinSxS\Manifests\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57.manifest
398 INFO: Searching for file msvcr90.dll
399 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll
399 INFO: Searching for file msvcp90.dll
399 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcp90.dll
399 INFO: Searching for file msvcm90.dll
399 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcm90.dll
488 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.21022.8_none_60a5df56e60dc5df.manifest
490 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.1_none_8550c6b5d18a9128.manifest
490 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4940_none_f47ed0f6f6564d90.manifest
491 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_f480bfaef65491a5.manifest
492 INFO: Adding redirect Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0, 30729, 6161)
615 INFO: Caching module hooks...
621 INFO: Analyzing D:\qrcode\main.py
5388 INFO: Processing pre-find module path hook distutils
5707 INFO: Processing pre-safe import module hook _xmlplus
6386 INFO: Processing pre-safe import module hook six.moves
6583 INFO: Loading module hooks...
6583 INFO: Loading module hook "hook-distutils.py"...
6584 INFO: Loading module hook "hook-xml.py"...
6655 INFO: Loading module hook "hook-httplib.py"...
6655 INFO: Loading module hook "hook-pyodbc.py"...
6718 INFO: Loading module hook "hook-requests.py"...
6729 INFO: Loading module hook "hook-encodings.py"...
7237 INFO: Looking for ctypes DLLs
7248 INFO: Analyzing run-time hooks ...
7263 INFO: Looking for dynamic libraries
8161 INFO: Looking for eggs
8161 INFO: Using Python library C:\Windows\system32\python27.dll
8161 INFO: Found binding redirects:
[BindingRedirect(name=u'Microsoft.VC90.CRT', language=None, arch=u'x86', oldVersion=(9, 0, 21022, 8), newVersion=(9, 0, 30729, 6161), publicKeyToken=u'1fc8b3b9a1e18e3b')]
8166 INFO: Warnings written to D:\qrcode\build\main_1.1.1\warnmain_1.1.1.txt
8276 INFO: checking PYZ
8294 INFO: checking PKG
8296 INFO: Building because D:\qrcode\main.py changed
8296 INFO: Building PKG (CArchive) out00-PKG.pkg
8335 INFO: Redirecting Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0, 30729, 6161)
10144 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
10153 INFO: Bootloader c:\python27\lib\site-packages\PyInstaller\bootloader\Windows-32bit\run.exe
10153 INFO: checking EXE
10155 INFO: Rebuilding out00-EXE.toc because pkg is more recent
10155 INFO: Building EXE from out00-EXE.toc
10156 INFO: Appending archive to EXE D:\qrcode\dist\main_1.1.1.exe
10163 INFO: Building EXE from out00-EXE.toc completed successfully.
```
**You can find there are two process instances(main_1.1.1.exe):**
![a72a8c15-20a7-421b-a357-8bfdda535deb](https://cloud.githubusercontent.com/assets/3325533/23587110/07a578a6-01e0-11e7-90c9-6c645a64f164.png)
What's the reason? I just want only on process instance.
When you build in onefile mode (-F), the program is decompressed to a temporary directory and run from there. The second process is your actual program, while the first process is meant to clean up the temporary directory after the program exits or crashes .
If there were only one process, there would be no way to clean up the temp directory in the event of a crash.
Yukarıda yazdığına göre, programı onefile
modunda inşa edince, program geçici bir dizine sıkıştırılır ve oradan çalıştırılır. İkinci işlem programın gerçek işlemidir. İlk işlem, programdan çıktıktan sonra -ya da program çöktükten sonra- geçici dizini temizlemek içindir.
WooW
Ağustos 23, 2019, 3:37ös
12
yardımın için teşekkür ederim.