无法使用python 3.7安装robot-framework-ride

时间:2018-07-23 03:56:08

标签: python-3.x robotframework robotframework-ide

我需要安装机器人框架。

我已经安装了python 3.7,wxPython和robotframework。需要安装robotframework-ride。尝试pip install robotframework-ride时遇到错误pip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in C:\Users\mani~1\AppData\Local\Temp\pip-install-ee73re19\robotframework-ride\

附加详细信息日志以供参考。

pip install robotframework-ride

删除了构建跟踪器'C:\ Users \ mani〜1 \ AppData \ Local \ Temp \ pip-req-tracker-vdskcs3j' 命令“ python setup.py egg_info”在C:\ Users \ mani〜1 \ AppData \ Local \ Temp \ pip-install-ee73re19 \ robotframework-ride \中失败,错误代码为1 异常信息:

    Traceback (most recent call last):
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\basecommand.py", line 141, in main
        status = self.run(options, args)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\commands\install.py", line 299, in run
        resolver.resolve(requirement_set)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\resolve.py", line 102, in resolve
        self._resolve_one(requirement_set, req)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\resolve.py", line 256, in _resolve_one
        abstract_dist = self._get_abstract_dist_for(req_to_install)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\resolve.py", line 209, in _get_abstract_dist_for
        self.require_hashes
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\operations\prepare.py", line 298, in prepare_linked_requirement
        abstract_dist.prep_for_dist(finder, self.build_isolation)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\operations\prepare.py", line 126, in prep_for_dist
        self.req.run_egg_info()
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\req\req_install.py", line 636, in run_egg_info
        command_desc='python setup.py egg_info')
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\utils\misc.py", line 701, in call_subprocess
        % (command_desc, proc.returncode, cwd))
    pip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in C:\Users\mani~1\AppData\Local\Temp\pip-install-ee73re19\robotframework-ride\

easy_install robotframework-ride

在处理上述异常期间,发生了另一个异常:

    Traceback (most recent call last):
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "C:\Users\mani\AppData\Local\Programs\Python\Python37-32\Scripts\easy_install.exe\__main__.py", line 9, in <module>
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\easy_install.py", line 2312, in main
        **kw
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\easy_install.py", line 412, in run
        self.easy_install(spec, not self.no_deps)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\easy_install.py", line 673, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\easy_install.py", line 699, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\easy_install.py", line 884, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\easy_install.py", line 1152, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\easy_install.py", line 1138, in run_setup
        run_setup(setup_script, args)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
        raise
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\contextlib.py", line 130, in __exit__
        self.gen.throw(type, value, traceback)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
        yield
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\contextlib.py", line 130, in __exit__
        self.gen.throw(type, value, traceback)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
        saved_exc.resume()
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\sandbox.py", line 141, in resume
        six.reraise(type, exc, self._tb)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
        raise value.with_traceback(tb)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
        yield saved
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
        yield
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "c:\users\mani\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "C:\Users\MPULAK~1\AppData\Local\Temp\easy_install-x0z_5joe\robotframework-ride-2.0a1\setup.py", line 20, in <module>
    NameError: name 'execfile' is not defined

4 个答案:

答案 0 :(得分:0)

这里的问题很简单,我从 execfile未定义可以看到,这是python3尚不支持您要安装的库。由于python 3或更高版本已将其修改为 exec 。我查看了github,发现了一些修复程序。

您可以查看此thread,用户helio似乎已经分叉了,因为官方项目尚未解决该问题。因此,您可以签出他的版本,并查看是否可以按照有关库的他的预发布说明进行操作。

P.S。请向下滚动并首先检查预发布版本,然后执行初始注释中提到的其他解决方法

答案 1 :(得分:0)

即使您使用64位笔记本电脑,也要尝试安装python 2.7.13或更高版本并使用32位:Windows x86 MSI安装程序

答案 2 :(得分:0)

有一个与Python 2.7版本兼容的版本。不幸的是,有一些已知的bug可以将人们拒之门外。 这些版本位于https://github.com/HelioGuilherme66/RIDE/releases/

答案 3 :(得分:0)

我已成功在 Windows 10(建于1909年)上安装了robotframework-ride。

请提供更多详细信息,

  1. 就像您在Windows版本“安装RF-RIDE之前”执行的步骤是什么一样,有时所有这些细节一开始似乎都被忽略了,在调试时可能会有所不同。
  2. 像pip的状态,pip版本等一样,对于调试目的与他人和您自己相关。
  3. 安装时看到错误(如您所提供的)

尝试创建一个virtualenv,然后继续在其中安装RF-RIDE,检查是否有任何问题,然后发表您的看法。

此外,Windows是非典型操作系统,因此,也请尝试使用“管理员权限”运行cmd /所有内容并进行检查(尽管我还没有这样做,因为我是管理员)

也许,这将使我们更接近可能的解决方案。

python 3.7.0


(sof1) C:\Users\devfu>python -V
Python 3.7.0

(sof1) C:\Users\devfu>pip list
Package      Version
------------ -------------------
certifi      2019.9.11
pip          19.3.1
setuptools   41.6.0.post20191030
wheel        0.33.6
wincertstore 0.2

(sof1) C:\Users\devfu>pip install robotframework-ride
Collecting robotframework-ride
  Using cached https://files.pythonhosted.org/packages/4e/a6/1835a17fa566b19c166735a9a75d55101e53b68566771ddb0b690dd4be83/robotframework_ride-1.7.3.1-py2.py3-none-any.whl
Processing c:\users\devfu\appdata\local\pip\cache\wheels\94\da\6e\2127e2253ef98b9b98b625e78f5158dd66966a5cc9f1d1478b\pypubsub-3.3.0-cp37-none-any.whl
Collecting wxPython
  Using cached https://files.pythonhosted.org/packages/8a/12/08d58ad0a782aa003f2f4c19c2d2d8a55bc0141f9b925ea2f066732a7319/wxPython-4.0.7.post2-cp37-cp37m-win_amd64.whl
Collecting robotframeworklexer
  Using cached https://files.pythonhosted.org/packages/24/18/ad01d42227d824b890f1b4d32237e5003bf7afe8764cb13545fb63d7fcb5/robotframeworklexer-1.1-py3-none-any.whl
Collecting Pywin32
  Using cached https://files.pythonhosted.org/packages/bb/23/00fe4fbf9963f3bcb34a443eba0d0283fc51e5887d4045552c87490394e4/pywin32-227-cp37-cp37m-win_amd64.whl
Collecting Pygments
  Using cached https://files.pythonhosted.org/packages/5c/73/1dfa428150e3ccb0fa3e68db406e5be48698f2a979ccbcec795f28f44048/Pygments-2.4.2-py2.py3-none-any.whl
Collecting robotframework
  Using cached https://files.pythonhosted.org/packages/22/0f/1b9ffa0c4e59789b50e6034866e823b7d4a5c7eaedad7bfd0bba42f2aa9d/robotframework-3.1.2-py2.py3-none-any.whl
Collecting numpy; python_version >= "3.0"
  Using cached https://files.pythonhosted.org/packages/34/40/c6eae19892551ff91bdb15f884fef2d42d6f58da55ab18fa540851b48a32/numpy-1.17.4-cp37-cp37m-win_amd64.whl
Collecting pillow
  Using cached https://files.pythonhosted.org/packages/70/f4/9dd0b7b0fea09cf4e7a2822031f2157f40d41f0252a89558bdb583e24ef1/Pillow-6.2.1-cp37-cp37m-win_amd64.whl
Collecting six
  Using cached https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
Installing collected packages: Pypubsub, numpy, pillow, six, wxPython, robotframeworklexer, Pywin32, Pygments, robotframework, robotframework-ride
Successfully installed Pygments-2.4.2 Pypubsub-3.3.0 Pywin32-227 numpy-1.17.4 pillow-6.2.1 robotframework-3.1.2 robotframework-ride-1.7.3.1 robotframeworklexer-1.1 six-1.13.0 wxPython-4.0.7.post2

(sof1) C:\Users\devfu>pip list
Package             Version
------------------- -------------------
certifi             2019.9.11
numpy               1.17.4
Pillow              6.2.1
pip                 19.3.1
Pygments            2.4.2
PyPubSub            3.3.0
pywin32             227
robotframework      3.1.2
robotframework-ride 1.7.3.1
robotframeworklexer 1.1
setuptools          41.6.0.post20191030
six                 1.13.0
wheel               0.33.6
wincertstore        0.2
wxPython            4.0.7.post2

python3.7.5


(sof0) C:\Users\devfu>python -V
Python 3.7.5

(sof0) C:\Users\devfu>pip list
Package      Version
------------ -------------------
certifi      2019.9.11
pip          19.3.1
setuptools   41.6.0.post20191030
wheel        0.33.6
wincertstore 0.2

(sof0) C:\Users\devfu>pip install robotframework-ride
Collecting robotframework-ride
  Downloading https://files.pythonhosted.org/packages/4e/a6/1835a17fa566b19c166735a9a75d55101e53b68566771ddb0b690dd4be83/robotframework_ride-1.7.3.1-py2.py3-none-any.whl (926kB)
     |████████████████████████████████| 931kB 1.6MB/s
Collecting Pygments
  Downloading https://files.pythonhosted.org/packages/5c/73/1dfa428150e3ccb0fa3e68db406e5be48698f2a979ccbcec795f28f44048/Pygments-2.4.2-py2.py3-none-any.whl (883kB)
     |████████████████████████████████| 890kB 6.4MB/s
Collecting robotframework
  Downloading https://files.pythonhosted.org/packages/22/0f/1b9ffa0c4e59789b50e6034866e823b7d4a5c7eaedad7bfd0bba42f2aa9d/robotframework-3.1.2-py2.py3-none-any.whl (602kB)
     |████████████████████████████████| 604kB 6.4MB/s
Collecting wxPython
  Downloading https://files.pythonhosted.org/packages/8a/12/08d58ad0a782aa003f2f4c19c2d2d8a55bc0141f9b925ea2f066732a7319/wxPython-4.0.7.post2-cp37-cp37m-win_amd64.whl (23.0MB)
     |████████████████████████████████| 23.0MB 3.3MB/s
Collecting Pywin32
  Downloading https://files.pythonhosted.org/packages/bb/23/00fe4fbf9963f3bcb34a443eba0d0283fc51e5887d4045552c87490394e4/pywin32-227-cp37-cp37m-win_amd64.whl (9.1MB)
     |████████████████████████████████| 9.1MB 3.3MB/s
Collecting robotframeworklexer
  Downloading https://files.pythonhosted.org/packages/24/18/ad01d42227d824b890f1b4d32237e5003bf7afe8764cb13545fb63d7fcb5/robotframeworklexer-1.1-py3-none-any.whl
Collecting Pypubsub==3.3.0
  Downloading https://files.pythonhosted.org/packages/95/5a/1801be1a63af9250e79b8941a37b88e3ca0d660b880b9862fe9016ae6a3a/PyPubSub-3.3.0.zip (87kB)
     |████████████████████████████████| 92kB 2.0MB/s
Collecting pillow
  Downloading https://files.pythonhosted.org/packages/70/f4/9dd0b7b0fea09cf4e7a2822031f2157f40d41f0252a89558bdb583e24ef1/Pillow-6.2.1-cp37-cp37m-win_amd64.whl (2.0MB)
     |████████████████████████████████| 2.0MB 6.4MB/s
Collecting six
  Downloading https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
Collecting numpy; python_version >= "3.0"
  Downloading https://files.pythonhosted.org/packages/34/40/c6eae19892551ff91bdb15f884fef2d42d6f58da55ab18fa540851b48a32/numpy-1.17.4-cp37-cp37m-win_amd64.whl (12.7MB)
     |████████████████████████████████| 12.7MB 6.4MB/s
Building wheels for collected packages: Pypubsub
  Building wheel for Pypubsub (setup.py) ... done
  Created wheel for Pypubsub: filename=PyPubSub-3.3.0-cp37-none-any.whl size=80837 sha256=757b7fd0cd0aa4640948e76e28cca5c8e7147f45e253b1e6c7e398e72c10cbf0
  Stored in directory: C:\Users\devfu\AppData\Local\pip\Cache\wheels\94\da\6e\2127e2253ef98b9b98b625e78f5158dd66966a5cc9f1d1478b
Successfully built Pypubsub
Installing collected packages: Pygments, robotframework, pillow, six, numpy, wxPython, Pywin32, robotframeworklexer, Pypubsub, robotframework-ride
Successfully installed Pygments-2.4.2 Pypubsub-3.3.0 Pywin32-227 numpy-1.17.4 pillow-6.2.1 robotframework-3.1.2 robotframework-ride-1.7.3.1 robotframeworklexer-1.1 six-1.13.0 wxPython-4.0.7.post2

(sof0) C:\Users\devfu>pip list
Package             Version
------------------- -------------------
certifi             2019.9.11
numpy               1.17.4
Pillow              6.2.1
pip                 19.3.1
Pygments            2.4.2
PyPubSub            3.3.0
pywin32             227
robotframework      3.1.2
robotframework-ride 1.7.3.1
robotframeworklexer 1.1
setuptools          41.6.0.post20191030
six                 1.13.0
wheel               0.33.6
wincertstore        0.2
wxPython            4.0.7.post2