使用Pydev 1.5进行调试

时间:2009-10-01 10:25:29

标签: debugging pydev

我正在尝试使用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

请告诉我什么是最好的解决方案。或者我错过了什么?

提前致谢。

1 个答案:

答案 0 :(得分:5)

你缺少django - pydev找不到django模块

你需要拥有python可以访问的所有python模块,这通常是通过让环境变量PYTHONPATH包含模块的目录来完成的。

在pydev中转到project-&gt; Properties-&gt; Pydev-PYTHONPATH选择External libraries选项卡。您需要将django包添加到路径中。

或者普通Djano install 应该将django放入python的site-packages中,因此应该在PYTHONPATH上可用

相关问题