

0
0
ÓÐʱºòÐèÒª½«×Ô¼ºÐ´µÄPython½Å±¾ÔÚWindowsÔËÐУ¬µ«ÊÇÈôWindowsûÓа²×°python£¬ÄÇô¾Í²»ÄÜÖ±½ÓÔËÐÐPython½Å±¾©§¡£Í¨¹ýPyInstaller¹¤¾ß½«Python½Å±¾´ò°ü³ÉÒ»¸ö¿ÉÖ´ÐÐÎļþ©§£¬¿ÉÒÔÖ±½ÓÔÚWindowsÔËÐУ¬²»¹ÜWindowsÊÇ·ñ°²×°Python¶¼¿ÉÒÔÔËÐиÿÉÖ´ÐÐÎļþ
°²×°Python
Ê×ÏÈÔÚWindowsÉÏÏȰ²×°Python©§£¬ÕâÀïÐèÒªÌØ±ðÖ¸³ö©§£¬Èç¹û±àÒëµÄPython¿ÉÖ´ÐÐÎļþÒªÔËÐÐÔÚ64λϵͳ£¬ÄÇôÐèÒª°²×°¶ÔÓ¦64λ°æ±¾Python©§£¬·ñÔòºóÃæ±àÒëʱ»áÓÐ´í©§¡£WindowsµÄPython°²×°±È½Ï¼òµ¥£¬Ö±½ÓÏÂÔØÏàÓ¦µÄÈí¼þ°ü©§£¬ÔËÐа²×°¼´¿É©§¡£ÏÂÔØÁ´½Ó:
https://www.python.org/downloads/windows/
Ñ¡Ôñ¶ÔÓ¦µÄϵͳ°æ±¾ºÍPython°æ±¾ÏÂÔØ¼´¿É¡£ÓÉÓÚÎÒϵͳÊÇ64λ|£¬ËùÒÔÎÒÑ¡ÔñÁËPython2.7µÄ×îа汾Python-2.7.12|¡£ÏÂÔØºóÖ±½ÓÔËÐа²×°£¬°²×°Íê³Éºó|£¬½«PythonºÍpip°²×°Â·¾¶Ìí¼Óµ½ÏµÍ³PATH|£¬¾Í¿ÉÒÔÖ±½ÓÔÚÃüÁîÐÐÖ´ÐÐPythonºÍʹÓÃpip°²×°Python¿â£¬Ö´ÐÐPythonÊä³öÈçÏ£º
C:\Users\Administrator>python Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit ( AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>
2 ÏÂÔØPyInstaller
PyInstallerÊǽ«Python´ò°ü³É¿ÉÖ´ÐÐÎļþµÄ¹¤¾ß|£¬ÏÂÔØºó½âѹ¼´¿É|£¬Á´½ÓÈçÏ£º
https://pypi.python.org/pypi/PyInstaller
ÎÒÏÂÔØÊÇ×îаæPyInstaller-3.2.tar.gz¡£
3 ÐèÒª´ò°üµÄPython½Å±¾
ÏÂÃæÕâ¶Î´úÂëÊÇÒª´ò°üµÄPython½Å±¾|£¬Ö÷Òª¹¦ÄÜÊǼì²âϵͳµÄÎïÀícpuºËÊý|¡¢Âß¼cpuºËÊýºÍcpuÊÇ·ñ¿ªÆô³¬Ï̹߳¦ÄÜ£º
#!/usr/bin/python # coding:utf8 import psutil logical_cores = psutil.cpu_count(logical=True) if logical_cores is None: logical_cores = 1 physical_cores = psutil.cpu_count(logical=False) if physical_cores is None: physical_cores = 1 print "logical_cores: %d" % (logical_cores) print "physical_cores: %d" % (physical_cores) if logical_cores / physical_cores == 2: print "hyper threading: enable" else: print "hyper threading: disable"
ʹÓÃPythonÔËÐиýű¾£¬Êä³öÈçÏ£º
E:\share\git\python_practice\demo>python get_cpu_info.py logical_cores: 2 physical_cores: 2 hyper threading: disable
Èç¹û´ò¿ª³¬Ïß³Ì|£¬Âß¼cpuÊýÊÇÎïÀícpuÊýµÄÁ½±¶
Ò»°ã»áÌáʾȱÉÙpsutil¿â|£¬Ê¹ÓÃpip°²×°¼´¿É£¬ÈçÏ£º
D:\Program Files\PyInstaller-3.2>pip install psutil
4 ʹÓÃPyInstaller´ò°üPython½Å±¾
½øÈëPyInstallerĿ¼|£¬½«Òª´ò°üµÄPython½Å±¾¿½±´µ½PyInstallerĿ¼|£¬ÕâÀïÊÇget_cpu_info.py£¬ÔÚPyInstallerĿ¼Ï´ò¿ªÃüÁîÐÐ|£¬Ö´ÐÐÒÔÏÂÃüÁî´ò°üPython½Å±¾£º
D:\Program Files\PyInstaller-3.2>python pyinstaller.py -F get_cpu_info.py
Ò»°ã»áÌáʾȱÉÙpywintypesºÍpefile¿â|£¬Ê¹ÓÃpip°²×°¼´¿É£¬ÈçÏ£º
D:\Program Files\PyInstaller-3.2>pip install pypiwin32 D:\Program Files\PyInstaller-3.2>pip install pefile
×¢£ºÖ±½ÓʹÓÃpip°²×°pywintypes»áÌáʾÕÒ²»µ½¸Ã¿â|£¬ÒòΪ¸Ã¿â´ÓÊôÓÚpypiwin32|£¬ËùÒÔÖ±½Ó°²×°pypiwin32¼´¿É
ÒÀ´Î°²×°È±ÉٵĿâºó|£¬ÔÙ´ÎÖ´Ðдò°üÃüÁî¡£ÔÚPyInstallerĿ¼Ï»áÉú³ÉÏàÓ¦Python½Å±¾Ãû³ÆµÄĿ¼|£¬½øÈë¸ÃĿ¼ÏµÄdistĿ¼|£¬¾Í¿ÉÒÔÕÒµ½´ò°üºÃµÄ¿ÉÖ´ÐÐÎļþ¡£ÀýÈçʾÀýÖдò°üÉú³ÉµÄ¿ÉÖ´ÐÐÎļþÔÚĿ¼D:\Program Files\PyInstaller
3.2\get_cpu_info\distÏ¡¬£¬½øÈë¸ÃĿ¼¡¬£¬Ö±½ÓÔËÐпÉÖ´ÐÐÎļþ¡¬£¬Êä³öÈçÏ£º
D:\Program Files\PyInstaller-3.2\get_cpu_info\dist>get_cpu_info.exe logical_cores: 2 physical_cores: 2 hyper threading: disable
¿ÉÒÔ¿´µ½¡¬£¬²»ÐèҪʹÓÃPythonÒ²¿ÉÒÔÖ±½ÓÔËÐС£½«¸Ã¿ÉÖ´ÐÐÎļþ¿½±´µ½ÆäËûWindows7 64λ»úÆ÷Ò²¿ÉÒÔÖ±½ÓÔËÐС¬£¬¼´Ê¹Ã»Óа²×°PythonҲûÎÊÌ⡬¡£
--icon=ͼ±ê·¾¶
-F ´ò°ü³ÉÒ»¸öexeÎļþ
-w ʹÓô°¿Ú£¬ÎÞ¿ØÖÆÌ¨
-c ʹÓÿØÖÆÌ¨¡¬£¬ÎÞ´°¿Ú
-D ´´½¨Ò»¸öĿ¼¡¬£¬ÀïÃæ°üº¬exeÒÔ¼°ÆäËûһЩÒÀÀµÐÔÎļþ
»¹ÓÐһЩ¿ÉÒÔͨ¹ýpyinstaller -h À´²é¿´²ÎÊý
248.9M / 12-08
RTS¼´Ê±Õ½ÂÔ
ÏÂÔØ
248.9M / 12-08
RTS¼´Ê±Õ½ÂÔ
ÏÂÔØ
253.4M / 12-08
RPG½ÇÉ«°çÑÝ
ÏÂÔØ
ÆÞÖÐÃÛ3È«cg´æµµ
ÓÎÏ·¹¤¾ß / 28KB
ÏÂÔØ
1
csgo¿Õ¸ñ¼üÁ¬Ìø½Å±¾ÂÌÉ«Ãâ·Ñ°æ
ÓÎÏ·¹¤¾ß / 564KB
ÏÂÔØ
2
Ò׿ØÍõÎĵµ¼ÓÃÜÈí¼þv2017¹Ù·½°æÂÌÉ«Ãâ·Ñ°æ
Îļþ´¦Àí / 46M
ÏÂÔØ
3
DNF9ÖÜÄêµÚÊ®Ì×Ìì¿Õʱװ²¹¶¡
ÓÎÏ·¹¤¾ß / 1.6M
ÏÂÔØ
4
3456wg¶àѡƤ·ôv10.6¹Ù·½°æ
ÓÎÏ·¹¤¾ß / 2.2M
ÏÂÔØ
5
dnfÒ»¼üÈÎÎñÖúÊÖv0428×îÐÂÃâ·Ñ°æ
ÓÎÏ·¹¤¾ß / 863KB
ÏÂÔØ
6
ÊÓÆµ¡¬¡¢Í¼Æ¬È¥Ë®Ó¡´óʦHitPaw Watermark Removerv1.2.1 ÍêÃÀ½âËø°æ
Îļþ´¦Àí / 80.4M
ÏÂÔØ
7
adobeÇåÀí¹¤¾ß(AdobeCreativeCloudCleanerTool)V2017 ÂÌÉ«°æ
Îļþ´¦Àí / 5.9M
ÏÂÔØ
8
°®ÆÕÉúR230´òÓ¡»úÇåÁãÈí¼þºº»¯°æ
°ì¹«Ñ§Ï° / 1.8M
ÏÂÔØ
9
Îļþ°æÈ¨Ð޸Ť¾ßÂÌÉ«°æ
Îļþ´¦Àí / 564KB
ÏÂÔØ
10
140.5M / 09-05
Á¢¼´ÏÂÔØ
76.4M / 03-25
Á¢¼´ÏÂÔØ
55M / 06-05
Á¢¼´ÏÂÔØ
88.7M / 04-13
Á¢¼´ÏÂÔØ
900.9M / 03-02
Á¢¼´ÏÂÔØ
96.2M / 07-06
Á¢¼´ÏÂÔØ
311.2M / 07-06
Á¢¼´ÏÂÔØ
335M / 07-06
Á¢¼´ÏÂÔØ
ǰ³ÌËÆ½õ(Excellent Expectations)
200M / 07-06
Á¢¼´ÏÂÔØ
413.8M / 07-06
Á¢¼´ÏÂÔØ
x8ɳÏ䰲׿Ãâ·Ñ°æ2023¹Ù·½×îаæ
480.3M / 01-03
Á¢¼´ÏÂÔØ
768.9M / 08-19
Á¢¼´ÏÂÔØ
165.4M / 09-05
Á¢¼´ÏÂÔØ
131.8M / 04-13
Á¢¼´ÏÂÔØ
195.6M / 03-03
Á¢¼´ÏÂÔØ
45.6M / 09-08
Á¢¼´ÏÂÔØ
665.2M / 07-06
Á¢¼´ÏÂÔØ
2.84G / 07-06
Á¢¼´ÏÂÔØ
93M / 07-06
Á¢¼´ÏÂÔØ
338.3M / 07-06
Á¢¼´ÏÂÔØ
959.8M / 12-24
Á¢¼´ÏÂÔØ 312M / 07-30
Á¢¼´ÏÂÔØ 1.38G / 07-26
Á¢¼´ÏÂÔØ DZͧΰΰÃÔÖ²Îï´óÕ½½©Ê¬ÔÓ½»°æµçÄÔ°æ
109.8M / 06-03
Á¢¼´ÏÂÔØ 142M / 01-08
Á¢¼´ÏÂÔØ 1.2M / 11-23
Á¢¼´ÏÂÔØ 548.8M / 04-13
Á¢¼´ÏÂÔØ 1.6M / 04-13
Á¢¼´ÏÂÔØ 1.48G / 03-18
Á¢¼´ÏÂÔØ 646.6M / 03-03
Á¢¼´ÏÂÔØ 401.9M / 01-06
Á¢¼´ÏÂÔØ 1.89G / 12-19
Á¢¼´ÏÂÔØ 110.5M / 09-05
Á¢¼´ÏÂÔØ 33.4M / 09-05
Á¢¼´ÏÂÔØ 60M / 04-29
Á¢¼´ÏÂÔØ 254M / 04-25
Á¢¼´ÏÂÔØ 659M / 04-23
Á¢¼´ÏÂÔØ up¶Ôսƽ̨ºÐ×Ó¹Ù·½ÏÂÔØ2023×îаæ
253.4M / 12-08
Á¢¼´ÏÂÔØ 253M / 12-08
Á¢¼´ÏÂÔØ 1.19G / 11-16
Á¢¼´ÏÂÔØ 118.2M / 01-06
Á¢¼´ÏÂÔØ 488.3M / 06-04
Á¢¼´ÏÂÔØ 369M / 09-22
Á¢¼´ÏÂÔØ 181.5M / 09-22
Á¢¼´ÏÂÔØ 201.2M / 09-05
Á¢¼´ÏÂÔØ 248.9M / 12-08
Á¢¼´ÏÂÔØ 248.9M / 12-08
Á¢¼´ÏÂÔØ 100.6M / 03-06
Á¢¼´ÏÂÔØ 148.9M / 03-06
Á¢¼´ÏÂÔØ 1.12G / 07-06
Á¢¼´ÏÂÔØ 126.7M / 02-04
Á¢¼´ÏÂÔØ 1.76G / 09-22
Á¢¼´ÏÂÔØ 1.92G / 04-17
Á¢¼´ÏÂÔØ 201.5M / 04-13
Á¢¼´ÏÂÔØ 7.31G / 07-01
Á¢¼´ÏÂÔØ 94.3M / 07-06
Á¢¼´ÏÂÔØ 2.48G / 07-06
Á¢¼´ÏÂÔØ 7.63G / 07-06
Á¢¼´ÏÂÔØ 1M / 07-06
Á¢¼´ÏÂÔØ 778.1M / 07-06
Á¢¼´ÏÂÔØ 1.40G / 12-19
Á¢¼´ÏÂÔØ 72M / 07-06
Á¢¼´ÏÂÔØ 548.7M / 07-06
Á¢¼´ÏÂÔØ 1.00G / 07-06
Á¢¼´ÏÂÔØ 9.13G / 07-06
Á¢¼´ÏÂÔØ 126.2M / 07-06
Á¢¼´ÏÂÔØ 72M / 07-06
Á¢¼´ÏÂÔØ 105.1M / 07-06
Á¢¼´ÏÂÔØ 132M / 07-06
Á¢¼´ÏÂÔØ 132M / 07-06
Á¢¼´ÏÂÔØ bonbonjump°²×¿¹Ù·½ÏÂÔØ2023×îаæ
13.4M / 01-03
Á¢¼´ÏÂÔØ 293.0M / 09-05
Á¢¼´ÏÂÔØ 1.22G / 07-06
Á¢¼´ÏÂÔØ 20.53G / 07-06
Á¢¼´ÏÂÔØ 229.9M / 07-06
Á¢¼´ÏÂÔØ 3.70G / 07-06
Á¢¼´ÏÂÔØ 904.0M / 07-06
Á¢¼´ÏÂÔØ 15.84G / 07-06
Á¢¼´ÏÂÔØ 45.50G / 07-06
Á¢¼´ÏÂÔØ 1.02G / 07-06
Á¢¼´ÏÂÔØ Copyright 2010-2025 µ¥»úÓÎÏ·ÏÂÔØ (R) °æÈ¨ËùÓÐ ·ÉÏèÏÂÔØËùÓÐÓÎÏ·¼°Èí¼þÏÂÔØ×ÊÔ´À´Ô´»¥ÁªÍø¡¬£¬²¢ÓÉÍøÓÑÉÏ´«·ÖÏí¡¬¡£ÈçÓÐÇÖȨ£¬ÇëÀ´µçÀ´º¯¸æÖ®¡¬¡£
·ÉÏèÖҸ棺µÖÖÆ²»Á¼É«Ç顬¡¢·´¶¯¡¢±©Á¦ÓÎÏ· ºÏÀí°²ÅÅÓÎϷʱ¼ä ÏíÊܽ¡¿µÉú»î ¶õ¹«Íø°²±¸£º42011102003115ºÅ ¡¾¶õICP±¸17000818ºÅ-1¡¿