2013-04-23 61 views
4

如何讓Django在aptana中工作?我甩掉了我的臉,嘗試了所有我能找到的東西,但我仍然沒有運氣。我正在使用運行獅子的Mac。Config Django 1.5.1 for aptana工作室3

我已經安裝了django,並且在閒置時我可以導入django並調用get_version(),它工作正常。 然後在aptana我想我已經做好了一切。我已經爲python解釋器做了自動配置,然後在庫中添加了django目錄。

\Library\Frameworks\Python.framework\Versions\2.7\lib\python2.7\site-packages\django

當我嘗試創建一個新的項目,我得到這個錯誤:

To get started with Django in PyDev, the pre-requisite is that Django is installed in the Python/Jython/IronPython interpreter you want to use (so, "import django" must properly work – if you're certain that Django is there and PyDev wasn't able to find it during the install process, you must go to the interpreter configuration and reconfigure your interpreter so that PyDev can detect the change you did after adding Django).

It seems that the selected interpreter does not have Django available, so, please install Django, reconfigure the interpreter so that Django is recognized and then come back to this wizard.

An introduction on how to get started with Django in Pydev is available at: http://pydev.org/manual_adv_django.html .

我已經到網站和它的沒有任何幫助。

我做錯了什麼?

+4

嘗試在庫中添加'\ Library \ Frameworks \ Python.framework \ Versions \ 2.7 \ lib \ python2.7 \ site-packages' – Ngenator 2013-04-23 19:18:18

+0

是的!謝謝!爲什麼我還必須添加該目錄呢? – DavidF 2013-04-23 19:35:32

+0

因爲'site-packages'包含'packages',它是包含'modules'和其他'packages'的文件夾。您需要包含根,以便可以訪問django包。 – Ngenator 2013-04-23 19:43:35

回答

1

嘗試添加僅\Library\Frameworks\Python.framework\Versions\2.7\lib\python2.7\site-packages到圖書館。

推理是:site-packages包含額外安裝的packages,它們是包含modules和其他packages的文件夾。您需要包含根,以便可以訪問整個django包(以及任何其他包)。

+0

爲什麼反斜槓在路徑中? – user507410 2015-02-15 07:04:25

+0

因爲這是怎麼op包括它的問題... – Ngenator 2015-02-15 07:07:23