ericMTR
ericMTR

Reputation: 211

Django development server won't run

I'm using Python 3.4.2 and Django 1.7.1

I've been able to create a folder called mysite with its content like shown in the tutorial.

But when I run the command manage.py runserver nothing happens:

C:\Users\thEpuQ8f\Dropbox\zephyrus>manage.py runserver

I get following message in the command line:

Usage: manage.py subcommand [options] [args]

Options:
  -v VERBOSITY, --verbosity=VERBOSITY
                    Verbosity level; 0=minimal output, 1=normal output,
                    2=verbose output, 3=very verbose output
  --settings=SETTINGS   The Python path to a settings module, e.g.
                    "myproject.settings.main". If this isn't provided, the
                    DJANGO_SETTINGS_MODULE environment variable will be
                    used.
  --pythonpath=PYTHONPATH
                    A directory to add to the Python path, e.g.
                    "/home/djangoprojects/myproject".
  --traceback           Raise on exception
  --no-color            Don't colorize the command output.
  --version             show program's version number and exit
  -h, --help            show this help message and exit

Type 'manage.py help <subcommand>' for help on a specific subcommand.

Available subcommands:

# and so forth

Upvotes: 1

Views: 5760

Answers (2)

ayoub ech-chetyouy
ayoub ech-chetyouy

Reputation: 29

Try this command:

python manage.py runserver

Adding python in front of your command will run your python file.

If it produces errors, then make sure that python is installed and python install dir is listed in your PATH environment variable.

When it runs, try opening this URL in your web browser of choice to see if it works.

Then you should see a page like this: enter image description here

Upvotes: 0

FrEaKmAn
FrEaKmAn

Reputation: 1845

You probably don't have the correct PYTHONPATH.

You know what has worked for me really well on windows.

My Computer > Properties > Advanced System Settings > Environment Variables >

Then under system variables I create a new Variable called PythonPath.

C:\Python34;C:\Python34\Lib;C:\Python34\DLLs;

Where Python34 is the folder of the Python. I don't know what's the correct folder name for python3. When you install the Python with installer, it should create PYTHONPATH automatically. So worst case scenario is that you just reinstall it.

enter image description here

Source: https://stackoverflow.com/a/4855685/73010

Upvotes: 1

Related Questions