• Traceback (most recent call last): File "setup.py", line 22, in <module> execfile(join(CURDIR, 'src', 'SSHLibrary', 'version.py')) NameError: name 'execfile' is not defined


    在python3环境下安装robotframework-SSHLibraray报错:

    Traceback (most recent call last):
    File "setup.py", line 22, in <module>
    execfile(join(CURDIR, 'src', 'SSHLibrary', 'version.py'))
    NameError: name 'execfile' is not defined

    在网上查了,SSHLibrary目前还不支持python3

    Pip3 (python3) and 'python3 setup.py install' of SSHLibrary on ubuntu failed with 'execfile' issue       

    When trying to install 'SSHLibrary' through Pip3 and source file 'python3 setup.py install' of SSHLibrary on ubuntu failing with the following:

    user@<host>:~$ pip3 install robotframework-sshlibrary
    Collecting robotframework-sshlibrary
      Using cached robotframework-sshlibrary-2.1.3.tar.gz
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-build-cj3iosaj/robotframework-sshlibrary/setup.py", line 22, in <module>
            execfile(join(CURDIR, 'src', 'SSHLibrary', 'version.py'))
        NameError: name 'execfile' is not defined
        
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-cj3iosaj/robotframework-sshlibrary/
    
     
     

    andreeakovacs commented 9 days ago

    The installation doesn't work, because the Python 3 compatibility for SSHLibrary isn't supported yet.
    This issue should be closed.

     
    原网址问答:https://github.com/robotframework/SSHLibrary/issues/194
     

             Importing test library 'SSHLibrary' failed: ImportError: No module named 'SSHLibrary' #2233

    Closed
    hubiao007 opened this Issue on 24 Nov 2015 · 6 comments

    Comments

     
    Projects
    None yet
    3 participants
     

    hubiao007 commented on 24 Nov 2015

    I got this message when I run pybot with my test. Is SSHLibrary not yet supported in 3.0a1?

     
     
    Owner

    jussimalinen commented on 24 Nov 2015

    Some more context would be good to have here. What Python version are you using? Do you have SSHLibary installed? Did the same tests work on earlier Robot Framework version on the same Python installation?

     
     

    hubiao007 commented on 24 Nov 2015

    Hi Jussimalinen

    In my workable context, with the same test case I am running Robotframework 2.9.2 with python 2.7.

    Then, I update to RBF 3.0a1 via command "pip3 install robotframework==3.0a1". With "pybot --version", it shows "Robot Framework 3.0a1 (Python 3.4.3 on linux)".

     
     

    hubiao007 commented on 24 Nov 2015

    About SSHLibrary: I am trying to install it also for python3 with cmd "sudo pip3 install robotframework-sshlibrary". It reports the following error

    Downloading/unpacking robotframework-sshlibrary
    Downloading robotframework-sshlibrary-2.1.2.tar.gz (93kB): 93kB downloaded
    Running setup.py (path:/tmp/pip_build_root/robotframework-sshlibrary/setup.py) egg_info for package robotframework-sshlibrary
    Traceback (most recent call last):
    File "", line 17, in
    File "/tmp/pip_build_root/robotframework-sshlibrary/setup.py", line 22, in
    execfile(join(CURDIR, 'src', 'SSHLibrary', 'version.py'))
    NameError: name 'execfile' is not defined
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

    File "", line 17, in

    File "/tmp/pip_build_root/robotframework-sshlibrary/setup.py", line 22, in

    execfile(join(CURDIR, 'src', 'SSHLibrary', 'version.py'))
    

    NameError: name 'execfile' is not defined


    Cleaning up...
    Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/robotframework-sshlibrary

     
     
    Owner

    pekkaklarck commented on 25 Nov 2015

    SSHLibrary doesn't yet support Python 3. Hopefully it will soon. An issue should be submitted to its tracker about that if there isn't one already.

    Do you have problems using SSHLibrary with RF 3.0a1 on Python 2?

     
     

    hubiao007 commented on 25 Nov 2015

    Hi Pekkaklarck

    Thank you for your answer

    In the context of RF3.0a1 and Python2, it has no problem with SSHLibrary.

     
     
    Owner

    pekkaklarck commented on 25 Nov 2015

    OK. Then the issue is just that SSHLibrary doesn't yet support Python 3. There is a plan to add the support in the somewhat near future, though. You can submit an issue about Python 3 support to SSHLibrary tracker if there isn't one yet.

     
     
    https://github.com/robotframework/robotframework/issues/2233
  • 相关阅读:
    枚举、函数关于oracle函数listagg的使用说明by小雨
    执行、Mongodb MapReduce示例1个by小雨
    事务、异常TSQL 编码时应该注意的10个问题by小雨
    源、执行GoldenGate 单向DDL同步by小雨
    Oracle中的所有权限by小雨
    数据库、版本数据库学习从此开始by小雨
    统计、案例深入理解Oracle索引(10):索引列字符类型统计信息的32位限制by小雨
    字段、数据库表三大范式及存储方式by小雨
    数据库、用户第二章Getting Start with the Oracle Server(oracle入门)by小雨
    搜索、关键字截图留念,“万能数据库查询分析器”作为关键字在百度和谷歌上的海量搜索结果by小雨
  • 原文地址:https://www.cnblogs.com/my-blogs-for-everone/p/7727587.html
Copyright © 2020-2023  润新知