Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/python-2.7/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 2.7 尝试安装robotframework appiumlibrary时出错_Python 2.7_Appium_Robotframework - Fatal编程技术网

Python 2.7 尝试安装robotframework appiumlibrary时出错

Python 2.7 尝试安装robotframework appiumlibrary时出错,python-2.7,appium,robotframework,Python 2.7,Appium,Robotframework,Mac OS-10.15.7 Python-2.7.18 我使用命令安装“pip install robotframework appiumlibrary”,下面是我得到的错误 @Amiths-MacBook-Pro ~ % pip install robotframework-appiumlibrary DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Py

Mac OS-10.15.7 Python-2.7.18

我使用命令安装“pip install robotframework appiumlibrary”,下面是我得到的错误

@Amiths-MacBook-Pro ~ % pip install robotframework-appiumlibrary
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting robotframework-appiumlibrary
  Using cached robotframework_appiumlibrary-1.5.0.7-py2.py3-none-any.whl (49 kB)
Collecting docutils>=0.8.1
  Using cached docutils-0.17.1-py2.py3-none-any.whl (575 kB)
Collecting six>=1.10.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting decorator>=3.3.2
  Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting kitchen>=1.2.4
  Using cached kitchen-1.2.6.tar.gz (255 kB)
Collecting selenium>=2.47.1
  Using cached selenium-3.141.0-py2.py3-none-any.whl (904 kB)
Requirement already satisfied: robotframework>=2.6.0 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from robotframework-appiumlibrary) (4.0.1)
Collecting Appium-Python-Client>=0.28
  Using cached Appium-Python-Client-1.1.0.tar.gz (53 kB)
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip-install-IQfrSA/appium-python-client/setup.py'"'"'; __file__='"'"'/private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip-install-IQfrSA/appium-python-client/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip-pip-egg-info-AVKVXp
         cwd: /private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip-install-IQfrSA/appium-python-client/
    Complete output (8 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip-install-IQfrSA/appium-python-client/setup.py", line 19, in <module>
        from appium.common.helper import library_version
      File "appium/common/helper.py", line 20
        def extract_const_attributes(cls: type) -> Dict[str, Any]:
                                        ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@Amiths-MacBook-Pro ~ % python setup.py egg_info                
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'setup.py': [Errno 2] No such file or directory
@Amiths MacBook Pro~%pip安装机器人框架应用程序库
弃用:Python 2.7在2020年1月1日结束了它的生命。请升级Python,因为不再维护Python 2.7。PIP21.0将在2021年1月放弃对Python2.7的支持。有关pip中Python 2支持的更多详细信息,请访问https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0将取消对该功能的支持。
收集机器人框架应用程序库
使用缓存的robotframework_appiumlibrary-1.5.0.7-py2.py3-none-any.whl(49 kB)
收集文档>=0.8.1
使用缓存的docutils-0.17.1-py2.py3-none-any.whl(575 kB)
收集六个>=1.10.0
使用缓存的six-1.15.0-py2.py3-none-any.whl(10 kB)
收集装饰器>=3.3.2
使用缓存的decorator-4.4.2-py2.py3-none-any.whl(9.2kb)
收集厨房>=1.2.4
使用缓存的kitchen-1.2.6.tar.gz(255 kB)
收集硒>=2.47.1
使用缓存的selenium-3.141.0-py2.py3-none-any.whl(904KB)
已满足要求:robotframework>=2.6.0 in/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages(来自robotframework应用程序库)(4.0.1)
正在收集Appium Python客户端>=0.28
使用缓存的Appium-Python-Client-1.1.0.tar.gz(53 kB)
错误:命令出错,退出状态为1:
命令:/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python-c'import sys,setuptools,tokenize;sys.argv[0]=“private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip install IQfrSA/appium python client/setup.py”“”__文件“''/private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip install IQfrSA/appium python client/setup.py''”;f=getattr(标记化,“'open'”,open)(\uuuuu文件);code=f.read().replace(“\r\n”“”、“\n”“”);f、 close();exec(编译(代码,“‘exec’”)‘蛋’信息——蛋库/private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip蛋信息AVKVXp
cwd:/private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip安装IQfrSA/appium python客户端/
完整输出(8行):
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/private/var/folders/xn/c052lddx4qz1lm8h6thg0w_h0000gn/T/pip install IQfrSA/appium python client/setup.py”,第19行,在
从appium.common.helper导入库\u版本
文件“appium/common/helper.py”,第20行
def extract_const_attributes(cls:type)->Dict[str,Any]:
^
SyntaxError:无效语法
----------------------------------------
错误:命令出错,退出状态为1:python setup.py egg_info检查日志以获得完整的命令输出。
@Amiths MacBook Pro~%python setup.py egg_info
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python:无法打开文件'setup.py':[Errno 2]没有这样的文件或目录

您需要使用python 3。x@BryanOakley但根据Appium,它在2.7中得到了完全支持。跟踪他们页面上的信息。“Python2.7完全支持它。python3.6+支持仍然是实验性的”[Link]@Amith虽然robotframework apiumlibrary可能不使用任何python3功能,但底层的appium没有。我甚至针对它提交了一份错误报告,但维护人员刚刚关闭了它:例如,您不能在不支持类型提示的python上运行appium,可能是3.5-不管作者怎么说:D“底层appium不是”应该只是“底层appium是”