Python pyautogui._pyautogui_osx';没有属性'_尺寸';

Python pyautogui._pyautogui_osx';没有属性'_尺寸';,python,python-3.x,pyautogui,Python,Python 3.x,Pyautogui,作为开发人员我是个新手,我试着运行一个Autospam机器人作为试用 在pip3安装pyautogui后,我执行了以下代码: import time import pyautogui time.sleep(5) f = open("requirements", 'r') for word in f: pyautogui.typewrite(word) pyautogui.press("enter") 问题是我遇到了以下问题: /Lib

作为开发人员我是个新手,我试着运行一个Autospam机器人作为试用

在pip3安装pyautogui后,我执行了以下代码:

import time
import pyautogui

time.sleep(5)
f = open("requirements", 'r')
for word in f:
    pyautogui.typewrite(word)
    pyautogui.press("enter")
问题是我遇到了以下问题:

/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/rubicon/objc/ctypes_patch.py:21: UserWarning: rubicon.objc.ctypes_patch has only been tested with Python 3.4 through 3.8. You are using Python 3.9.0. Most likely things will work properly, but you may experience crashes if Python's internals have changed significantly.
  warnings.warn(
Traceback (most recent call last):
  File "/Users/davidbonavia/PycharmProjects/pythonProject3/testtchatbot.py", line 2, in <module>
    import pyautogui
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyautogui/__init__.py", line 2144, in <module>
    _right, _bottom = size()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyautogui/__init__.py", line 769, in size
    return Size(*platformModule._size())
AttributeError: module 'pyautogui._pyautogui_osx' has no attribute '_size'
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site packages/rubicon/objc/ctypes_patch.py:21:UserWarning:rubicon.objc.ctypes_patch仅在Python 3.4到3.8中测试过。您正在使用Python 3.9.0。很可能事情会正常工作,但如果Python的内部结构发生了重大变化,您可能会遇到崩溃。
警告,警告(
回溯(最近一次呼叫最后一次):
文件“/Users/davidbonavia/PycharmProjects/pythonProject3/testtchatbot.py”,第2行,在
导入pyautogui
文件“/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site packages/pyautogui/__init___;.py”,第2144行,在
_右,_bottom=size()
文件“/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site packages/pyautogui/__init___;.py”,第769行,大小
返回大小(*platformModule.\u Size())
AttributeError:模块“pyautogui.\u pyautogui\u osx”没有属性“\u size”
我试图检查什么是Rubicon以及如何解决这个问题,但我真的不知道。有人能帮我吗


大家好

阅读警告?
rubicon.objc.ctypes_修补程序仅在Python 3.4到3.8中进行了测试。您正在使用Python 3.9.0
您可能会遇到崩溃
是的,我读到了,有任何解决方案可以避免这种情况吗?嗯,您是否尝试安装/使用较低版本的Python?是否有任何方法可以使用较低版本启动Python还是应该重新安装?@OneCricketeerPython3.9只能运行Python3.9…不过,您可以使用名为pyenv的工具安装不同版本的Python