1、安裝python,pycharm
查看下面兩篇文章
https://zhuanlan.zhihu.com/p/39807526 安裝python
https://zhuanlan.zhihu.com/p/39924564 安裝pycharm
2、安裝工具包
安裝好工具之後
pip install lxml
pip install reuqests
pip install pyinstaller
3、代碼實例
爬取豆瓣電影信息 適合小白入門
https://blog.csdn.net/MTbaby/article/details/79174036
4、打包運行
1、已經安裝好pyinstaller 找到你存儲python.py文件的那個文件夾
2、按住shift 然後右鍵選擇在此處打開powershell窗口
3、執行pyinstaller xxx.py命令
4、裏面會生成dist文件和xxx文件,裏面的exe就是可執行文件,但是exe要在文件裏面才能執行,單獨拿出來不執行