无法导入木偶

时间:2018-05-15 20:10:53

标签: python python-2.7 firefox marionette mozilla

当我尝试在Python中导入Marionette驱动程序时,我收到了这样的回复:

Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) 
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> from marionette import Marionette
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/marionette_client-2.0.0-py2.7.egg/marionette/__init__.py", line 7, in <module>
    from .marionette_test import (
  File "/usr/local/lib/python2.7/dist-packages/marionette_client-2.0.0-py2.7.egg/marionette/marionette_test.py", line 18, in <module>
    from marionette_driver.errors import (
  File "/usr/local/lib/python2.7/dist-packages/marionette_driver-1.1.1-py2.7.egg/marionette_driver/__init__.py", line 7, in <module>
    from marionette_driver import (
  File "/usr/local/lib/python2.7/dist-packages/marionette_driver-1.1.1-py2.7.egg/marionette_driver/expected.py", line 8, in <module>
    from marionette import HTMLElement
  File "/usr/local/lib/python2.7/dist-packages/marionette_driver-1.1.1-py2.7.egg/marionette_driver/marionette.py", line 20, in <module>
    from mozrunner import B2GEmulatorRunner
ImportError: cannot import name B2GEmulatorRunner
>>> 

我安装了Mozrunner软件包,但它没有任何B2GEmulatorRunner。有关导致此问题的原因以及如何解决此问题的任何建议?

编辑:

用PIP更新我的整个Python 2.7库后,现在我遇到了这个问题:

>>> import marionette
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/marionette/__init__.py", line 7, in <module>
    from .marionette_test import (
ImportError: No module named marionette_test

0 个答案:

没有答案