2010-12-19 96 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