1.下載pyinstaller并解壓(可以去官網(wǎng)下載最新版):
https://github.com/pyinstaller/pyinstaller/
2.下載pywin32并安裝(注意版本,我的是python2.7):
https://pypi.python.org/pypi/pywin32
3.將項目文件放到pyinstaller文件夾下面(我的是baidu.py):
4.按住shift鍵右擊,在當(dāng)前路徑打開命令提示行,輸入以下內(nèi)容(最后的是文件名):
python pyinstaller.py -F baidu.py
5.生成的exe文件,在baidu文件夾下的dist文件夾中,雙擊即可運(yùn)行:
新聞熱點
疑難解答
圖片精選