添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

描述问题bug
在非IDE环境下运行web selenium的脚本报错ModuleNotFoundError: No module named 'pynput'

查看gitlab上代码 https://github.com/AirtestProject/airtest-selenium/blob/master/airtest_selenium/proxy.py
from pynput.mouse import Controller, Button
实际上没有pynput模块

Traceback (most recent call last):
  File "C:\Users\Yibin\Desktop\airtd.air\airtd.py", line 7, in <module>
    from airtest_selenium.proxy import WebChrome
  File "D:\Python36\lib\site-packages\airtest_selenium\__init__.py", line 1, in <module>
    from .proxy import WebChrome, Element
  File "D:\Python36\lib\site-packages\airtest_selenium\proxy.py", line 13, in <module>
    from pynput.mouse import Controller, Button
ModuleNotFoundError: No module named 'pynput'
(贴出遇到问题时的截图内容,如果有的话)
(在AirtestIDE里产生的图像和设备相关的问题,请贴一些AirtestIDE控制台黑窗口相关报错信息)

pip install airtest-selenium
pip install airtest
2. 使用pychram上运行脚本
3. 报错:ModuleNotFoundError: No module named 'pynput'

web selenium的脚本在非IDE环境下运行

python 版本: python3.6

airtest 版本: 1.0.69

airtest版本通过pip freeze可以命令可以查到

  • 型号: [e.g. google pixel 2]
  • 系统: [e.g. Android 8.1]
  • (别的信息)
  • 其他相关环境信息
    (其他运行环境,例如在linux ubuntu16.04上运行异常,在windows上正常。)