2011-04-05 135 views
0

當我嘗試import os在我的bash我得到:無法導入OS

import: unable to open X server ' @ error/import.c/ImportImageCommand/364 

是否有人知道如何解決這個問題?

回答

3

你應該輸入到Python的REPL,而不是你的shell。因爲它是你調用import,ImageMagick命令來截取屏幕截圖。

$ python 
Python 2.6.4 (r264:75706, Jun 4 2010, 18:20:31) 
[GCC 4.4.4 20100503 (Red Hat 4.4.4-2)] on linux2 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import os 
>>> 
+0

這可以幫助我很多。謝謝 :) – krzyhub 2011-04-05 16:47:30