安装uiautomator2提示Running setup.py install for lxml did not run successfully.安装weditor提示egg_info失败

1.环境:

windows系统 + jdk 17 + adb 29.0.6-6198805 

2.安装uiautomator2问题

pip install -U uiautomator2 

ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: 'C:\\Python311\\Scripts\\readelf.py'
Consider using the `--user` option or check the permissions.

使用pip install --pre --user uiautomator2

再次失败,提示

Running setup.py install for lxml did not run successfully.

...

 Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?

通过这两个关键问题,我开始寻找解决问题的方法,不断失败,two thousand years later。。。

解决方法:

 使用pip进行离线安装lxml,先通过如下网址下载whl文件

Archived: Python Extension Packages for Windows - Christoph Gohlke (uci.edu)

(1)在命令窗口使用使用 python --version 确认python版本号

(2)下载对应版本,我的是3.11.0windows系统64位

(3) 打开whl文件所在的文件夹,在路径中输入cmd,然后再输入命令

pip install lxml-4.9.0-cp311-cp311-win_amd64.whl

立即提示安装成功:

 (4)再重新安装uiautomator2:pip install --pre --user uiautomator2 成功!!

3.安装weditor的问题

pip install --user weditor

提示 python setup.py egg_info did not run successfully.

在一个博客评论区找到了解决方法;

0.6.5的版本有问题,设置版本为0.6.4解决问题。
pip install --pre --upgrade weditor==0.6.4

参考文章:

https://blog.csdn.net/li2642530979/article/details/106334797

https://blog.csdn.net/technologist_41/article/details/123212212

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值