Django:python manage.py not woroking but python2.7 manage.py is
Question: I HAVE A Weird Kind of Error.When I run manage.py in virtualenv it shows me an
error

    
    
    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
    

But when I run

> python2.7 manage.py

it gives me the correct results.I could not understand what error it is and
how to fix it because I do not want every time to type python2.7 Also when I
run

> pip freeze > requiremts.txt

it's not showing the complete packages installed but they are installed in the
site-packages within the the virtualenv. Now what error is this, anyone
please?


Answer: Activate the virtual env:

    
    
    . virtual_env_dir/bin/activate
    

