使用Pydev 1.5进行调试

big*_*mac 5 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
Run Code Online (Sandbox Code Playgroud)

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

提前致谢.

use*_*019 5

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

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

在pydev中转到project-> Properties-> Pydev-PYTHONPATH选择External libraries选项卡.您需要将django包添加到您的路径中.

或者正常的Djano安装 应该将django放入python的site-packages中,因此应该在PYTHONPATH上可用