在ironpython上安装机器人框架时出错

时间:2017-07-28 15:45:32

标签: testing robotframework ironpython

我对在Windows机器上在IronPython上安装robotframework感到很生气。请有人来看看。

我已经安装了IronPython 2.7.7,为main和Scripts文件夹添加了路径系统变量,我也安装了elementtree-1.2.7-20070827-preview.zip,因为看起来IronPython附带的库是“破碎的“(此信息和说明来自IronPython网站)。

然后我运行

    ipy -X:Frames -m ensurepip 

能够使用pip。

现在应该准备好所有东西以通过以下方式安装机器人框架:

    ipy -X:Frames -m pip install robotframework

软件包开始下载到此处:

  Complete output from command python setup.py egg_info:
  Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\setuptools\__init__.py", line 11, in <module>
  File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\setuptools\extern\__init__.py", line 1, in <module>
  File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\__init__.py", line 46, in <module>
  File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\extern\__init__.py", line 42, in load_module
  File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\_vendor\six.py", line 701, in <module>
  File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\_vendor\six.py", line 692, in exec_
  AttributeError: 'module' object has no attribute '_getframe'

----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in c:\users\***\appdata\local\temp\pip-build-vnlada\robotframework\

我尝试了另一种解决方法,只需下载robotframework源码,解压缩并将其放入我的程序文件夹中。从我试图运行的RF文件夹:

    C:\Program Files (x86)\IronPython 2.7\ipy.exe" setup.py install

并再次出现同样的错误:

     File "setup.py", line 11, in <module>
       File "C:\Program Files (x86)\IronPython 2.7\Lib\site-                  packages\setuptools\__init__.py", line 11, in <module>
       File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\setuptools\extern\__init__.py", line 1, in <module>
       File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\__init__.py", line 46, in <module>
       File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\extern\__init__.py", line 42, in load_module
       File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\_vendor\six.py", line 701, in <module>
       File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\pkg_resources\_vendor\six.py", line 692, in exec_
     AttributeError: 'module' object has no attribute '_getframe'

在这个网站上,这个人使用这个最后的解决方法解决了这个问题,但它并没有对我有用。 http://it-kosmopolit.de/blog/2015/08/31/install-robot-framework-with-ironpython-on-windows/

提前谢谢你。

1 个答案:

答案 0 :(得分:0)

这就是我如何解决它,但我不打算说是解决它的方法。

还有适用于Windows的Robot Framework的安装程序.exe,但它们不适用于IronPython,而是Python。请记住,我已经有了IronPython文件夹,我所做的是:

  • 安装Python
  • 下载并从此处https://pypi.python.org/pypi/robotframework/2.8.5
  • 安装RF安装程序.exe文件
  • 安装它指向Python目录(它不识别IronPython文件夹)
  • 只需将我的IronPython文件夹中的ipy.exe添加到PATH变量。

令人惊讶的是,它不再令人头痛,我现在在IronPython上有了Robot Framework。