Can't Start Project.

60 views
Skip to first unread message

Steve Burrus

unread,
Jul 1, 2015, 11:27:14 AM7/1/15
to django...@googlegroups.com
I need some help please with  tryiong to start a new Django project. Here is the error message I always get when I try to do this. can someone help me with this?
  
"C:\Users\SteveB\Desktop\steve>.\Scripts\activate
(steve) C:\Users\SteveB\Desktop\steve>python .\Scripts\django-admin.py startproject proj
python: can't open file '.\Scripts\django-admin.py': [Errno 2] No such file or directory"



Steve Burrus

unread,
Jul 1, 2015, 2:04:29 PM7/1/15
to django...@googlegroups.com
well I was able to create a new project earlier however I am now having trouble with starting the django ser ver. when I ran this cpommand "python .\Scripts\django-admin.py runserver" I always get this error message : "python: can't open file '.\Scripts\django-admin.py': [Errno 2] No such file or directory". What's going on for me to get this error?

Bill Freeman

unread,
Jul 1, 2015, 4:14:58 PM7/1/15
to django-users
cd to the directory containing manage.py (the project directory), then:

  python manage.py runserver

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/db741397-9c7c-4368-805c-07d60d6042bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steve Burrus

unread,
Jul 1, 2015, 4:27:25 PM7/1/15
to django...@googlegroups.com
cd to the directory containing manage.py (the project directory), then: "python manage.py runserver" Yeah I just now did exact;ly that but STILL got the error message : "(steve) C:\Users\SteveB\Desktop\steve\src>python manage.py runserver Traceback (most recent call last):  File "manage.py", line 8, in <module> from django.core.management import execute_from_command_line ImportError: No module named django.core.management" I r enamed my newly created project to "src".


--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/1wWP0wRstsU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.

Bill Freeman

unread,
Jul 1, 2015, 4:59:07 PM7/1/15
to django-users
It sounds like django isn't on your path.  If you are running in a virtualenv, was django pip installed while running in that same environment?

Steve Burrus

unread,
Jul 1, 2015, 5:35:41 PM7/1/15
to django...@googlegroups.com
no django was not installed so I did a quick "pip install django" and installed django 1.8.2 into my ins tance of virualenv and was [finally] able to connect to the django server. I assume trhat I can easily do the "python manage.py syncdb" to connect to the sqllite3 server?
 

Bill Freeman

unread,
Jul 1, 2015, 5:41:22 PM7/1/15
to django-users
Yes.  syncdb should work, assuming that sqlite is available (I think that it's built in in all the python 3.x versions), and assuming that you have a correctly configured settings.py (startproject makes one, but you will still have things to enter, such as data base configuration info (like the file to use to back sqlite), or to edit, such as your timezone.

Gergely Polonkai

unread,
Jul 1, 2015, 6:07:40 PM7/1/15
to django...@googlegroups.com

No, Django does that for you. You only have to worry about DB settings if you want something else like MySQL or Postgres.

Bill Freeman

unread,
Jul 1, 2015, 6:52:24 PM7/1/15
to django-users
As long as you're happy with the default file name.

Steve Burrus

unread,
Jul 1, 2015, 9:09:47 PM7/1/15
to django...@googlegroups.com
"As long as you're happy with the default file name." What exactly are you referring to Bill? The database settings? Say how dpo you synch either mysql or the postgres database server into django anyway? I really haven't figured out yet how to do that I am afraid.

  

Bill Freeman

unread,
Jul 2, 2015, 9:07:59 AM7/2/15
to django-users
SQLite persists your data in a file on the filesystem.  You get to choose the name in settings.py.

Using other databases requires additional configuration, including getting them installed, installing a python adapter that django supports, creating a database user with suitable permissions, and more.  There's lots of fine documentation on line at docs.djangoproject.com and elsewhere, and I'm not going to attempt to duplicate it here.  Also, since I never run django (or most things) anywhere but linux, I would probably run afoul of Windows nits pretty quickly.

Reply all
Reply to author
Forward
0 new messages