linux 安装 python windmill

  
  
  
  
  1. sudo apt-get install python2.5 
  2. wget http://peak.telecommunity.com/dist/ez_setup.py 
  3. sudo python ez_setup.py 
  4. sudo apt-get install python-setuptools 

 

  
  
  
  
  1.     sudo apt-get install python-dev 
  2.     sudo apt-get install python-openssl 

  3.  
  4. sudo easy_install windmill 
  5.  
  6. windmill shell firefox http://www.google.com 

ERROR:

 

  
  
  
  
  1. [admin@localhost ~]$ windmill shell firefox 
  2. Traceback (most recent call last): 
  3.   File "/usr/bin/windmill", line 9, in <module> 
  4.     load_entry_point('windmill==1.6''console_scripts''windmill')() 
  5.   File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/bin/windmill_bin.py", line 33, in main 
  6.     admin_lib.command_line_startup() 
  7.   File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/bin/admin_lib.py", line 351, in command_line_startup 
  8.     shell_objects = setup() 
  9.   File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/bin/admin_lib.py", line 182, in setup 
  10.     shell_objects_dict['browser'] = getattr(shell_objects, browser[0].lower())() 
  11.   File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/bin/shell_objects.py", line 45, in start_firefox 
  12.     controller = windmill.browser.get_firefox_controller() 
  13.   File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/browser/__init__.py", line 116, in get_firefox_controller 
  14.     controller = mozrunner.get_moz_from_settings(copy.copy(windmill.settings)) 
  15.   File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/dep/_mozrunner/__init__.py", line 165, in get_moz_from_settings 
  16.     cmd_args=settings['MOZILLA_CMD_ARGS']) 
  17.   File "/usr/lib/python2.7/site-packages/windmill-1.6-py2.7.egg/windmill/dep/_mozrunner/__init__.py", line 131, in get_moz 
  18.     raise Exception ('No default or local profile has been set.'
  19. Exception: No default or local profile has been set

解决方法:

在 ~/.windmill/prefs.py, 文件中增加下面2行:

  
  
  
  
  1. MOZILLA_BINARY='/usr/bin/firefox'                                                               
  2. MOZILLA_DEFAULT_PROFILE='~/.mozilla/firefox/' 


 

你可能感兴趣的:(linux,python,职场,休闲,windmill)