Forums

/usr/bin/env: ‘python\r’: No such file or directory

I am getting the above error while trying to migrate my database

following is my code from my manage.py <p>

!/usr/bin/env python<br>

import os<br> import sys<br> <br>

if name == "main":<br> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CentralBank.settings")<br> try:<br> from django.core.management import execute_from_command_line<br> except ImportError as exc:<br> raise ImportError(<br> "Couldn't import Django. Are you sure it's installed and "<br> "available on your PYTHONPATH environment variable? Did you "<br> "forget to activate a virtual environment?"<br> ) from exc<br> execute_from_command_line(sys.argv)<br> <p><br>

Please help me solve this error

Are you running that command in the virtual environment your web app is using?