我需要安装机器人框架。
我安装了python 3.7、wxPython和robotframework。需要安装自动车架。尝试pip install robotframework-ride
时,得到错误pip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in C:Usersmani~1AppDataLocalTemppip-install-ee73re19robotframework-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:usersmaniappdatalocalprogramspythonpython37-32libsite-packagespip_internalbasecommand.py", line 141, in main
status = self.run(options, args)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagespip_internalcommandsinstall.py", line 299, in run
resolver.resolve(requirement_set)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagespip_internalresolve.py", line 102, in resolve
self._resolve_one(requirement_set, req)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagespip_internalresolve.py", line 256, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagespip_internalresolve.py", line 209, in _get_abstract_dist_for
self.require_hashes
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagespip_internaloperationsprepare.py", line 298, in prepare_linked_requirement
abstract_dist.prep_for_dist(finder, self.build_isolation)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagespip_internaloperationsprepare.py", line 126, in prep_for_dist
self.req.run_egg_info()
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagespip_internalreqreq_install.py", line 636, in run_egg_info
command_desc='python setup.py egg_info')
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagespip_internalutilsmisc.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:Usersmani~1AppDataLocalTemppip-install-ee73re19robotframework-ride
easy_install robotframework-ride
在处理上述异常的过程中,发生了另一个异常:
Traceback (most recent call last):
File "c:usersmaniappdatalocalprogramspythonpython37-32librunpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:usersmaniappdatalocalprogramspythonpython37-32librunpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:UsersmaniAppDataLocalProgramsPythonPython37-32Scriptseasy_install.exe__main__.py", line 9, in <module>
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolscommandeasy_install.py", line 2312, in main
**kw
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptools__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "c:usersmaniappdatalocalprogramspythonpython37-32libdistutilscore.py", line 148, in setup
dist.run_commands()
File "c:usersmaniappdatalocalprogramspythonpython37-32libdistutilsdist.py", line 966, in run_commands
self.run_command(cmd)
File "c:usersmaniappdatalocalprogramspythonpython37-32libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolscommandeasy_install.py", line 412, in run
self.easy_install(spec, not self.no_deps)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolscommandeasy_install.py", line 673, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolscommandeasy_install.py", line 699, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolscommandeasy_install.py", line 884, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolscommandeasy_install.py", line 1152, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolscommandeasy_install.py", line 1138, in run_setup
run_setup(setup_script, args)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolssandbox.py", line 253, in run_setup
raise
File "c:usersmaniappdatalocalprogramspythonpython37-32libcontextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolssandbox.py", line 195, in setup_context
yield
File "c:usersmaniappdatalocalprogramspythonpython37-32libcontextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolssandbox.py", line 166, in save_modules
saved_exc.resume()
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolssandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptools_vendorsix.py", line 685, in reraise
raise value.with_traceback(tb)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolssandbox.py", line 154, in save_modules
yield saved
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolssandbox.py", line 195, in setup_context
yield
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolssandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:usersmaniappdatalocalprogramspythonpython37-32libsite-packagessetuptoolssandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:UsersMPULAK~1AppDataLocalTempeasy_install-x0z_5joerobotframework-ride-2.0a1setup.py", line 20, in <module>
NameError: name 'execfile' is not defined
正如我从未定义的执行文件中所看到的,这里的问题是您试图安装的库在python3上还不受支持。由于python 3或更高版本已将其修改为exec。我查看了github并找到了一些修复方法。
你可以看看这个帖子,用户helio似乎已经做出了一个分叉,因为官方项目还没有解决这个问题。所以你可以查看他的版本,看看你是否可以按照相关库的说明进行预发布。
p.S.请向下滚动并首先检查预发布,然后执行初始评论中提到的其他解决方案
有一个版本与Python的2.7版本兼容。不幸的是,有一些已知的错误会让人们望而却步。新闻稿在https://github.com/HelioGuilherme66/RIDE/releases/.
尝试安装python 2.7.13或更新版本,并使用32位,即使你有一台64位的笔记本电脑:Windows x86 MSI安装程序
我成功地在Windows 10(1909版本(上安装了robotframework ride。
请提供更多详细信息,
- 就像你在安装RF-RIDE之前执行的步骤一样(如果有(,windows版本,有时所有这些细节一开始似乎都被忽略了,这可能会在调试时产生影响
- 比如pip的状态以及pip版本等,无论是与他人还是您自己相关的,都可以用于调试
- 安装时会出现错误(如您提供的(
尝试创建一个virtualenv并继续在那里安装RF-RIDE,检查是否发现任何问题,并发布您的观察结果。
此外,Windows是非典型的操作系统,所以,也可以尝试运行cmd/具有"管理员权限"的任何东西并检查(尽管我没有这样做,因为,我是管理员(
也许,这会使我们更接近一个可能的解决方案。
python 3.7.0
(sof1) C:Usersdevfu>python -V
Python 3.7.0
(sof1) C:Usersdevfu>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:Usersdevfu>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:usersdevfuappdatalocalpipcachewheels94da6e2127e2253ef98b9b98b625e78f5158dd66966a5cc9f1d1478bpypubsub-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:Usersdevfu>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
蟒蛇3.7.5
(sof0) C:Usersdevfu>python -V
Python 3.7.5
(sof0) C:Usersdevfu>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:Usersdevfu>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:UsersdevfuAppDataLocalpipCachewheels94da6e2127e2253ef98b9b98b625e78f5158dd66966a5cc9f1d1478b
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:Usersdevfu>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