解决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

然后重启重新加载运行环境即可


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM