Traceback (most recent call last): File "setup.py", line 22, in execfile(join(CURDIR,...

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

Traceback (most recent call last):
File "setup.py", line 22, in
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@:~$ 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 "", line 1, in 
      File "/tmp/pip-build-cj3iosaj/robotframework-sshlibrary/setup.py", line 22, in 
        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
 

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
Traceback (most recent call last): File
 

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?

 
Traceback (most recent call last): File
 

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)".

 
Traceback (most recent call last): File
 

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?

 
Traceback (most recent call last): File
 

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

转载于:https://www.cnblogs.com/my-blogs-for-everone/p/7727587.html

你可能感兴趣的:(Traceback (most recent call last): File "setup.py", line 22, in execfile(join(CURDIR,...)