我只是想使用 django 获得一个“hello world”。我已经将 django 下载到我的桌面上,并且我的应用程序文件夹中有带有 Idle 的 python。我已按照https://www.djangoproject.com/download/上的说明进行操作,但是当我尝试import django
空闲时,我得到了ImportError: No module named django
我环顾四周并尝试sys.path
了哪些产量['', '/Users/nicholastzikas/Documents', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages']
我也见过PYTHONPATH
几次提到,但我不知道如何使用它。任何帮助深表感谢。