Python 2.7 获得;编码';是此函数的无效关键字参数";关于通过PIP安装pyautogui

Python 2.7 获得;编码';是此函数的无效关键字参数";关于通过PIP安装pyautogui,python-2.7,pip,pyautogui,Python 2.7,Pip,Pyautogui,当我试图将“pyautogui”库安装到python时,我遇到了这个错误。请参阅以下详情- ERROR: Complete output from command python setup.py egg_info: ERROR: Traceback (most recent call last): File "<string>", line 1, in <module> File "################\pip-install-pmckiy\pygetwind

当我试图将“pyautogui”库安装到python时,我遇到了这个错误。请参阅以下详情-

ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "################\pip-install-pmckiy\pygetwindow\setup.py", line 10, in <module>
with open('README.md', 'r', encoding='utf-8') as fh:
TypeError: 'encoding' is an invalid keyword argument for this function
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in c:\################\pip-install-pmckiy\pygetwindow\
错误:命令python setup.py egg_info的完整输出:
错误:回溯(最近一次呼叫上次):
文件“”,第1行,在
文件“pip安装pmckiy\pygetwindow\setup.py”,第10行,在
将open('README.md','r',encoding='utf-8')作为fh:
TypeError:“encoding”是此函数的无效关键字参数
----------------------------------------
错误:命令“python setup.py egg\u info”失败,错误代码为c:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Python版本-2.7.12

我已经尝试过的事情-

1.)我已经升级了pip,当前版本为PIP19.1.1

2.)我还遵循了另一个答案中给出的步骤

3.)由于这是安装,我无法控制代码,我也尝试在文件中搜索此错误,但运气不好,因此下面的URL也对我帮助不大-


4.)我也尝试过安装setuptools,但也没有帮助

这是pygetwindow中的一个错误,已经报告但尚未解决:

问题是Python 3中有参数
编码
,但是。也就是说,代码现在需要Python3