2009-10-01 68 views
5

我試圖與Pydev的1.5調試與Pydev的1.5

我已經做幾乎是在該文檔中提到啓動調試器一切調試應用程序。

pydev debugger: warning: psyco not available for speedups (the debugger will still work correctly, but a bit slower) 
pydev debugger: starting 
Traceback (most recent call last): 
    File "C:\Documents and Settings\mkallat\Desktop\eclipse\plugins\org.python.pydev.debug_1.5.0.1251989166\pysrc\pydevd.py", line 953, in <module> 
    debugger.run(setup['file'], None, None) 
    File "C:\Documents and Settings\mkallat\Desktop\eclipse\plugins\org.python.pydev.debug_1.5.0.1251989166\pysrc\pydevd.py", line 780, in run 
    execfile(file, globals, locals) #execute the script 
    File "Z:\dev\hfholidays\urls.py", line 1, in <module> 
    from django.conf.urls.defaults import * 
ImportError: No module named django.conf.urls.defaults 

請建議我什麼是這個最好的解決辦法:

當我嘗試啓動調試我得到這個錯誤。或者我錯過了什麼?

在此先感謝。

回答

5

你缺少Django的 - 的PyDev無法找到Django的模塊

你需要有你需要訪問到Python具有環境變量PYTHONPATH這通常包括模塊的目錄中所有的Python模塊。

在pydev中,進入project-> Properties-> Pydev-PYTHONPATH,選擇External libraries選項卡。您需要將django包添加到您的路徑中。

或者正常的Djano install應該把Django放到python的站點包中,所以應該可以在PYTHONPATH上使用