/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python:无法打开文件'selftest.py':[Errno 2]没有这样的文件或目录
当我执行哪个python时,我得到/ opt / local / bin / python
所以selftest.py正在寻找错误的地方,但我该如何解决这个问题?
python manage.py shell可以工作,所有其他的django命令都可以。
安装PIL后我正在运行此selftest.py
--------------------------------------------------------------------
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 :(得分:0)
如果没有更多信息,比如你输入的内容和selftest
。py文件的内容,很难说出发生了什么。但更重要的一个问题是:为什么要从头开始安装PIL?从您显示的路径(/opt/local/
),您显然已经在使用MacPorts
。您可以使用两个命令安装最新的PIL(一个,如果您使MacPorts
安装保持最新):
$ sudo port selfupdate
$ sudo port py26-pil
您也可以从MacPorts
安装django:
$ sudo port py26-django