My application was running fine when I was running it on my local machine. But, as soon as I uploaded it on a server , manage.py is giving the following error -
File "manage.py", line 14 ) from exc ^ SyntaxError: invalid syntax
This is the code for manage.py -
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "chatbot.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 ***//Here is the error***
execute_from_command_line(sys.argv)
I am using Python 2.7 and Django 1.11