Loading

python3.5+installer 将.py 打包成.exe

(1)下载安装installer,不如我安装在D:\Program Files\Python35,安装完成后,在D:\Program Files\Python35\Scripts可以找到installer.exe

(2)执行打包

D:\Program Files\Python35\Scripts>pyinstaller -F spider_005.py

(3)碰到问题

D:\Program Files\Python35\Scripts>pyinstaller -F spider_005.py
failed to create process.

解决办法:

找到D:\Program Files\Python35\Scripts\pyinstaller-script.py

#!D:\Program Files\Python35\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'PyInstaller==3.3','console_scripts','pyinstaller'

改成

#!"D:\Program Files\Python35\python.exe"
# EASY-INSTALL-ENTRY-SCRIPT: 'PyInstaller==3.3','console_scripts','pyinstaller'

 

(4)执行成功

 

(5)因为我是把.py文件放到了D:\Program Files\Python35\Scripts\下,所以在D:\Program Files\Python35\Scripts\下会发现新增了2个文件夹build和dist

 

posted @ 2017-10-19 09:43  江雪独钓翁  阅读(8961)  评论(1编辑  收藏  举报