python -m uiautomator2 init报错

来源:7-2 数据可视化组件kibana的安装和在elasticsearch基本的增删改查

慕勒5311868

2023-04-10

(venv) user1@imooc:~$ python3 -m uiautomator2 init
AttributeError: module ‘re’ has no attribute ‘Pattern’
(venv) user1@imooc:~$ python -m uiautomator2 init
ModuleNotFoundError: No module named ‘PIL’

写回答

1回答

慕勒5311868

提问者

2023-04-10

已解决,首先先让Ubuntu连接到手机上去,命令为:adb connect 手机的IP,注意此操作可以在虚拟机终端操作或者在SecureCRT连接工具上操作均可;然后,在终端输入uiautomator2 init即可,前面不要加python -m,这个是解决问题的关键。

1
0

移动端Python爬虫实战 数据抓取+数据可视化

从App数据抓取到数据可视化,全流程讲解

1831 学习 · 1003 问题

查看课程