views:

203

answers:

1

This is blowing my mind because it's probably an easy solution, but I can't figure out what could be causing this.

So I have a new dev box and am setting everything up. I installed virtualenv, created a new environment for my project under ~/.virtualenvs/projectname

Then, I cloned my project from github into my projects directory. Nothing fancy here. There are no .pyc files sitting around so it's a clean slate of code.

Then, I activated my virtualenv and installed Django via pip. All looks good so far.

Then, I run python manage.py syncdb within my project dir. This is where I get confused:

 ImportError: No module named projectname

So I figured I may have had some references of projectname within my code. So I grep (ack, actually) through my code base and I find nothing of the sorts.

So now I'm at a loss, given this environment why am I getting an ImportError on a module named projectname that isn't referenced anywhere in my code?

I look forward to a solution .. thanks guys!

+1  A: 

Is projectname exactly (modulo suffix) the name of the directory the project is in? Wild guess, but I know Django does some things with the current directory…

Also, what is trying to import projectname? Do you get a traceback? If not, try running with py manage.py --traceback syncdb and see what happens.

David Wolever