tags:

views:

58

answers:

1

I'm trying to install djangobb and when running manage.py syncdb it returns with

Traceback (most recent call last):
  File "manage.py", line 2, in <module>
    from django.core.management import execute_manage
ImportError: No module named django.core.management

I know that deep in my python installation there is django/core/management, but I just don't know how to get manage.py to find it for me. Can someone point me in the right direction please?

+1  A: 

Make sure that the base directory for where django/ lives is on your $PYTHONPATH

eruciform
I tried that -- cygwin complains a litle bit about it -- and then it still fails.cygwin warning: MS-DOS style path detected: \PYTHON25\lib\site-packag Preferred POSIX equivalent is: /cygdrive/c/PYTHON25/l CYGWIN environment variable option "nodosfilewarning" Consult the user's guide for more details about POSIX http://cygwin.com/cygwin-ug-net/using.html#using-paTraceback (most recent call last): File "manage.py", line 2, in <module> from django.core.management import execute_managerImportError: No module named django.core.management
Brian D
just out of curiosity, if you copy the whole django tree to ./django where manage.py is, does it still complain? if not, then it's definitely a path issue. if so, then maybe something isn't installed properly, like maybe some files are missing the ms-dos carriage return as a result of improper installation. how was it installed? a dump from svn or an installation command run?
eruciform
well it looks like something definitely got screwed up. i did a bunch of easy_installs to get the dependents up and running for djangobb and now none of django projects will run for the very same reason -- can't find core. i tried copying it to the directory itself like you suggested and it's working (at least to the point where it complains that it's not configured properly, but that is expected).
Brian D
It's definitely a path issue, but I'm not sure how to rectify it :/
Brian D
try moving that django dir-tree to another directory one up or down, and set pythonpath explicitly and rerun. if it works, then it's not the path itself but possibly some permissions on the actual django directory. if you can't point pythonpath to an explicit directory, then perhaps the path is being set wrongly, with weird whitespace characters, or the opposite slash character as needed.also make sure you have a consistent install of django - not 1.1 in some places and 1.2 in others...
eruciform
I think I installed python 2.6.* (I was using 2.5 when this was working) and a ton of other stuff which might be screwing things up inadvertently via cygwin.
Brian D
I think will uninstall everything that cygwin did, reinstall django (which should set the path for me), and get back to this thread after that ... there were some fishy tracebacks involving Python 2.6 that I uncovered while toying around with various django-admin.py commands.
Brian D
Yep. Cygwin screwed up my path royally, directing all python commands to the wrong directory. Thanks for your help :)
Brian D
no problem, happy to help, thanks for the green checkmark :-)
eruciform