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
andreeakovacs commented 9 days ago
The installation doesn't work, because the Python 3 compatibility for SSHLibrary isn't supported yet. |
Importing test library 'SSHLibrary' failed: ImportError: No module named 'SSHLibrary' #2233
Comments
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? |
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 File "", line 17, in File "/tmp/pip_build_root/robotframework-sshlibrary/setup.py", line 22, in
NameError: name 'execfile' is not defined Cleaning up... |
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. |
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://www.cnblogs.com/my-blogs-for-everone/p/7727587.html
When trying to install 'SSHLibrary' through Pip3 and source file 'python3 setup.py install' of SSHLibrary on ubuntu failing with the following: