2010-12-19 93 views
0

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python:無法打開文件'selftest.py':[錯誤2]沒有這樣的文件或目錄運行python2.6 selftest.py給我這個錯誤

當我做這蟒蛇,我得到的/ opt/local/bin目錄/蟒蛇

所以selftest.py是找錯了地方,但我會如何解決這個問題?

python manage.py shell的工作原理和所有其他的django命令。

我安裝PIL

-------------------------------------------------------------------- 
PIL 1.1.7 SETUP SUMMARY 
-------------------------------------------------------------------- 
version  1.1.7 
platform  darwin 2.6.5 (r265:79063, Aug 8 2010, 21:45:26) 
      [GCC 4.2.1 (Apple Inc. build 5659)] 
-------------------------------------------------------------------- 
--- TKINTER support available 
--- JPEG support available 
--- ZLIB (PNG/ZIP) support available 
--- FREETYPE2 support available 
*** LITTLECMS support not available 
-------------------------------------------------------------------- 
To add a missing option, make sure you have the required 
library, and set the corresponding ROOT variable in the 
setup.py script. 

To check the build, run the selftest.py script. 
running build_scripts 
creating build/scripts-2.6 
copying and adjusting Scripts/pilconvert.py -> build/scripts-2.6 
copying and adjusting Scripts/pildriver.py -> build/scripts-2.6 
copying and adjusting Scripts/pilfile.py -> build/scripts-2.6 
copying Scripts/pilfont.py -> build/scripts-2.6 
copying and adjusting Scripts/pilprint.py -> build/scripts-2.6 
changing mode of build/scripts-2.6/pilconvert.py from 644 to 755 
changing mode of build/scripts-2.6/pildriver.py from 644 to 755 
changing mode of build/scripts-2.6/pilfile.py from 644 to 755 
changing mode of build/scripts-2.6/pilfont.py from 644 to 755 
changing mode of build/scripts-2.6/pilprint.py from 644 to 755 

回答

0

這很難說是怎麼回事,沒有更多的信息,比如你輸入什麼和selftest .py文件的內容之後運行此selftest.py。但更重要的問題是:爲什麼要從頭開始安裝PIL?從您顯示的路徑(/opt/local/)您顯然已經使用MacPorts。你可以有一個工作,跟上時代的兩個命令安裝PIL(一個,如果你把你的MacPorts安裝了最新的):

$ sudo port selfupdate 
$ sudo port py26-pil 

您也可以從MacPorts安裝Django:

$ sudo port py26-django