如何在Mac os x 10.12.3上安装 robotframework,最近折腾了几天也没搞定。网上该找的文档也基本看了遍未能解决,特来请教。
相关依赖已经通过 pip 安装上了。
pip freeze
robotframework==3.0.2
robotframework-ride==1.5.2.1
wxPython-common==2.8.12.1
执行 ride.py 还是提示未找到 wxPython,但单独进 python 里面 import wx 也是正常的:
python
Python 2.7.10 (default, Jul 30 2016, 19:40:32)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx
<module 'wx' from '/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/__init__.pyc'>
>>>
ride.py
wxPython not found.
You need to install wxPython 2.8.12.1 or 3.0.2 or newer with unicode support to run RIDE. wxPython can be downloaded from http://sourceforge.net/projects/wxpython/files/wxPython/
单独执行 pybot --help,也报错,去 python 命令行里执行这个 import 确实不行:
Traceback (most recent call last):
File "/usr/local/bin/pybot", line 4, in <module>
from robot import run_cli
ImportError: cannot import name run_cli
虽然 Mac 自带的 python 是 64bit 的,但我已经调整过了参数了:
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
python
Python 2.7.10 (default, Jul 30 2016, 19:40:32)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import struct;print struct.calcsize("P") * 8
32
快要绝望了,求大神指点下。不吝辞谢...