切记版本 <=python3.7才能安装上Airtest库 和poco库

安装代码:
pip install -U airtest -i https://pypi.tuna.tsinghua.edu.cn/simple/
上面这个安装的时候报错了:
可以试下:

pip --default-timeout=100 install airtest
pip install -U poco -i https://pypi.tuna.tsinghua.edu.cn/simple/
打包库:
pip install pyinstaller -i https://pypi.tuna.tsinghua.edu.cn/simple/
打包库:
pip install pyinstaller -i https://pypi.tuna.tsinghua.edu.cn/simple/

打包技巧:(必须做这步不然打包后是运行不了的)
第一步: 找到你的pyinstaller库的目录的hooks
D:\Program Files (x86)\Python38\Lib\site-packages\PyInstaller
第二步:
下载我搞好的文件:https://www.lanzoui.com/itK5jj4zvhg
解压后,把里面的两个文件放入hooks文件夹中
如果你之前有打包过,那请把你的项目文件夹中的
build/dist文件夹都删掉
还有 xxx.spec文件也删掉,
然后命令行打包
打包代码: pyinstaller -F main.py
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/xiaoxiamimm/article/details/114260224