报错This program needs access to the screen. Please run with a Framework build of python…

喜欢ヅ旅行 2024-04-17 14:43 164阅读 0赞

今天在本地装了robotframework的环境,运行时出现报错。

  1. This program needs access to the screen. Please run with a
  2. Framework build of python, and only when you are logged in
  3. on the main display of your Mac.

查了半天,其原因是因为wxpython在虚拟环境中运行时,一定会抛出此error。
最后在官方wiki中找到了解决方案。
在这里插入图片描述
当前运行的虚拟环境的bin目录下,新建一个.sh文件,然后照它抄
在这里插入图片描述
保存退出,然后

  1. ./script.sh ride.py

即可成功运行ride.py文件!

发表评论

表情:
评论列表 (有 0 条评论,164人围观)

还没有评论,来说两句吧...

相关阅读