UIAutomator2框架安装过程中安装weditor报错解决方案

1、前置准备工作:

      本地新建目录、python文件;

UIAutomator2框架安装过程中安装weditor报错解决方案_第1张图片

2、使用pycharm打开该python文件,打开终端:

        安装python的uiautomator2库 ,命令:

              pip install -U uiautomator2

        开始安装atx-agent,命令:

           python-m uiautomator2 init

UIAutomator2框架安装过程中安装weditor报错解决方案_第2张图片

手机上允许安装ATX:

 UIAutomator2框架安装过程中安装weditor报错解决方案_第3张图片

3、安装weditor:

            命令: pip install -U weditor

   遇到报错:error: metadata-generation-failed

   解决方案:pip install setuptools==50.3.2

报错:UIAutomator2框架安装过程中安装weditor报错解决方案_第4张图片

 解决方案:

      pip3 install torch==1.10.0+cu113 torchvision==0.11.1+cu113 torchaudio===0.10.0+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html -i http://mirrors.aliyun.com/pypi/simple/  --trusted-host mirrors.aliyun.com

UIAutomator2框架安装过程中安装weditor报错解决方案_第5张图片

 然后再执行:pip install setuptools==50.3.2

UIAutomator2框架安装过程中安装weditor报错解决方案_第6张图片

 执行:pip install -U weditor 报错:

UIAutomator2框架安装过程中安装weditor报错解决方案_第7张图片

 解决方案:

        打开 git bash :

进入python安装的路径,初始化:

git init 

下载 weditor:

git clone https://github.com/openatx/weditor

        打开cmd窗口:

进入weditor下载的目录 :

安装weditor:

pip3 install -e weditor

启动weditor:

python -m weditor

UIAutomator2框架安装过程中安装weditor报错解决方案_第8张图片

此时浏览器中会打开weditor界面:

UIAutomator2框架安装过程中安装weditor报错解决方案_第9张图片

 

偶尔会断开服务:可以点击:

 UIAutomator2框架安装过程中安装weditor报错解决方案_第10张图片

 

weditor下载安装过的话,后续就只用在cmd窗口中启动weditor即可:

(需进入weditor的下载安目录)输入命令:python -m weditor

UIAutomator2框架安装过程中安装weditor报错解决方案_第11张图片

你可能感兴趣的:(python,pycharm,python,github)