First, I've read all the threads I could find that have similar titles. This is bound to be a repost, but I've looked and didn't find it.
Second, here's my setup and what I've done. I'm on Windows 7
. I'm following the getting started guide for Heroku
at: https://devcenter.heroku.com/articles/django. I used the guide they provided for installing Python
, virtualenv
, distribute
, and pip
(http://docs.python-guide.org/en/latest/starting/install/win/). I installed Python 2.7
, with no other version present using the Windows installer. I then followed the steps laid out in the guide on Heroku
exactly as they are. I had to use the alternate method for installing psycopg2
, but it seemed to work fine.
The problem came up then I got to the step where I am supposed to run
django-admin.py startproject hellodjango .
I get this error when I try to run the command:
(venv) C:\Users\myname\projectdir>django-admin.py startproject hellodjango .
Traceback (most recent call last):
File "C:\Users\myname\projectdir\venv\Scripts\django-admin.py", line 2, in <module>
from django.core import management
ImportError: No module named django.core
I have tried manually running Python from within the virtual environment and importing django, django.core, and the line specified in the error text, and all work:
(venv) C:\Users\myname\projectdir>python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> from django import core
>>> import django.core
>>> from django.core import management
>>>
I tried using pip to uninstall everything, deleting the virtual environment, deleting the project folder, then starting over. The same errors happened.
It's probably something simple, but I can't figure out what I'm missing. Any ideas?
edit - Also, I tried changing the command to :
django-admin.py startproject projectdir .
but this had the same result.
Then I tried:
python C:\Users\myname\projectdir\venv\Lib\site-packages\django\bindjango-admin.py startproject projectdir .
But I got:
python: can't open file 'C:\Users\wtodom\hdj\venv\Lib\site-packages\django\bindj
ango-admin.py': [Errno 2] No such file or directory