0

I can successfully run git clone 'my repository'

I can run 'pip3 install -r requirements.txt'; from the correct directory 'server'

When I run the command 'python3 manage.py makemigrations'; nothing happens.

When I run 'python3 -m pip show django', I get the following:

Name: Django Version: 3.2.14 Summary: A high-level Python Web framework that encourages rapid development and clean, pragmatic design. Home-page: https://www.djangoproject.com/ Author: Django Software Foundation Author-email: [email protected] License: BSD-3-Clause Location: /home/theia/.local/lib/python3.6/site-packages Requires: asgiref, pytz, sqlparse Required-by:

My requirements.txt file:

\\\
requests
Django
# changed to 20.1.0 to get rid of error
gunicorn==20.1.0
Pillow==8.0.1
ibm-cloud-sdk-core==3.10.0
ibm-watson==5.2.2
ibmcloudant==0.0.34
\\\

my manage.py file:

\\\
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys


def main():
    """Run administrative tasks."""
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangobackend.settings')
    try:
        from django.core.management import execute_from_command_line
    except ImportError as exc:
        raise ImportError(
            "Couldn't import Django. Are you sure it's installed and "
            "available on your PYTHONPATH environment variable? Did you "
            "forget to activate a virtual environment?"
        ) from exc
    execute_from_command_line(sys.argv)


    if __name__ == '__main__':
         main()
\\\

If I run 'python manage.py makemigrations', I get the following error:

File "manage.py", line 17 ) from exc ^ SyntaxError: invalid syntax

If I run 'python3 manage.py makemigrations', nothing happens.

My version of python is 2.7.17

I am working in a virtual lab through Skills Network Labs as part of the Coursera Full Stack Course (Theia; the lab is deleted at sign off), 'I run the command ps -ef | grep runserver', and get this:

theia 2018 279 0 13:22 pts/0 00:00:00 grep --color=auto runserver

so I don't think 'killing' the server would work.

INSTALLED_APPS is present in my settings.py folder.

I only have the single project running.

Ideas? I'm kind of new, so if you say, add such and such, can you be specific? same for command; thank you.

3
  • What you got when you run python3 manage.py runserver ? Commented Jul 9, 2022 at 13:45
  • nothing happens at all in the terminal. it just go's to the prompt. no error message or anything. Commented Jul 10, 2022 at 11:05
  • Please show your settings.py. Commented Jul 11, 2022 at 8:33

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.