解决pyautogui.PyAutoGUIException: PyAutoGUI was unable to import pyscreeze.报错
作者:互联网
1.“PyAutoGUI was unable to import pyscreeze. (This is likely because you’re running a version of Python that Pillow (which pyscreeze depends on) doesn’t support currently.) Please install this module to enable the function you tried to call.”
pyautogui.PyAutoGUIException: PyAutoGUI was unable to import pyscreeze. (This is likely because you’re running a version of Python that Pillow (which pyscreeze depends on) doesn’t support currently.) Please install this module to enable the function you tried to call.
解决方案:
pip install pyscreeze
下载依赖包,解决.
2.由于我使用的是idea的python插件,在第一次创建python项目时没有选择自己的python安装路径,于是idea自动在F盘给我创建了一个python的运行环境,然而我在命令行使用的python命令和下载的包都在D盘..... 最后通过更改运行环境解决了问题:
File➡project Structure➡SDKs
选择自己的python目录下的python.exe
然后重启重新加载运行环境即可
标签:pyautogui,PyAutoGUI,pyscreeze,python,unable,报错,import,was 来源: https://www.cnblogs.com/yvshang/p/15601550.html