Unresolved import: models

前端 未结 9 1067
星月不相逢
星月不相逢 2020-12-03 03:32

I\'m doing my VERY first project using python/django/eclipse/pydev following this guide

http://docs.djangoproject.com/en/dev/intro/tutorial01/

My only additi

相关标签:
9条回答
  • 2020-12-03 04:09

    "Unresolved imports" occur when Eclipse/Pydev does not know what you want to import. Check your Pydev settings in the Eclipse preferences > Interpreter Python. Your site-packages folder and things you want to import should be there in the Pythonpath.

    Also see http://pydev.org/manual_101_interpreter.html

    0 讨论(0)
  • 2020-12-03 04:14

    I was able to get rid of the import errors executing this cmd

    sudo ln -s /usr/lib/pymodules/ /usr/lib/python2.6/pymodules
    

    I was lucky, testing different things I could resolve it but I'm not sure why I have to do this and how I could avoid doing it.

    0 讨论(0)
  • 2020-12-03 04:20

    In my case of the modules were dependent on setuptools-14.3.1 , which was causing all these problems. After installation of setuptools-14.3.1 rest of the modules automatically resolved.

    0 讨论(0)
提交回复
热议问题