如何解决Python-无法导入pyautogui
Python 3.9.0 (tags/v3.9.0:9cf6752,Oct 5 2020,15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help","copyright","credits" or "license()" for more information.
>>> import pyautogui
Traceback (most recent call last):
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\__init__.py",line 305,in <module>
_win_os_check()
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\__init__.py",line 302,in _win_os_check
raise RuntimeError(msg.format(__file__)) from None
RuntimeError: The current Numpy installation ('C:\\Users\\ADMIN\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\numpy\\__init__.py') fails to pass a sanity check due to a bug in the windows runtime.
>>>
解决方法
我在Python 3.9中使用了Numpy 1.19.4,并且发生了错误。因此,将您的numpy安装降级到1.19.3(首先卸载PyAutoGUI,然后卸载Numpy,然后使用pip install numpy==1.19.3
再重新安装Numpy 1.19.3,然后再安装PyAutoGUI)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。