Getting "encoding' is an invalid keyword argument for this function" 关于通过 PIP 安装 pyautogui
Getting "encoding' is an invalid keyword argument for this function" On Installing pyautogui via PIP
我在尝试将 "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 Version - 2.7.12
我已经尝试过的东西 -
1.) 我升级了 pip,当前版本 - pip 19.1.1
2.) 我也按照另一个答案中给出的步骤进行操作
"pip install unroll": "python setup.py egg_info" failed with error code 1
3.) 由于这是安装,我无法控制代码,我也尝试在文件中搜索此错误但没有成功,因此下面的 URL 也对我没有太大帮助 -
Is 'encoding is an invalid keyword' error inevitable in python 2.x?
4.) 我也试过安装 setuptools,但也没用
这是 pygetwindow 中的错误,已报告但未解决:https://github.com/asweigart/PyGetWindow/issues/9
问题是在Python 3 open
has parameter encoding
, but not in Python 2。也就是说,代码现在需要 Python 3.
我在尝试将 "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 Version - 2.7.12
我已经尝试过的东西 -
1.) 我升级了 pip,当前版本 - pip 19.1.1
2.) 我也按照另一个答案中给出的步骤进行操作
"pip install unroll": "python setup.py egg_info" failed with error code 1
3.) 由于这是安装,我无法控制代码,我也尝试在文件中搜索此错误但没有成功,因此下面的 URL 也对我没有太大帮助 -
Is 'encoding is an invalid keyword' error inevitable in python 2.x?
4.) 我也试过安装 setuptools,但也没用
这是 pygetwindow 中的错误,已报告但未解决:https://github.com/asweigart/PyGetWindow/issues/9
问题是在Python 3 open
has parameter encoding
, but not in Python 2。也就是说,代码现在需要 Python 3.