I have fixture JSON file for Django models and I want to update data through a python script. I don't want to run command on terminal `python manage.py loaddata fixture.json`. This I want to do through python script.

I have created virtual environment for Django. I also want to start virtual environment through script. I wrote small script but it is not working.

```
from subprocess import call
from os import chdir, getcwd

original_directory = getcwd()
chdir('/home/naresh/test_django')
call('source bin/activate', shell = True)
chdir('graphossss/')
call('python manage.py loaddata background/fixtures.json', shell= True)
chdir(original_directory)

```

Got error:

> 
> "File "manage.py", line 8, in 
> 
> 
> from django.core.management import execute\_from\_command\_line
> 
> 
> ImportError: No module named django.core.management"
> 
> 
> 

This means virtual env is not activated...