title: How to install tensorflow for Django Applications
body: <p>I am trying to use tensorflow for my django web application. I installed tensor flow in anaconda using the following commands</p>
  
  <pre><code>conda create -n tensorflow_env tensorflow
  conda activate tensorflow_env
  </code></pre>
  
  <p>Now I am trying to import tensor flow and executing the below script in django shell but I am getting an error  </p>
  
  <pre><code>ModuleNotFoundError: No module named 'tensorflow'
  </code></pre>
  
  <p>I have read similar questions but they talk about the tensorflow environment is different from the conda environment. How do I make sure that the tensorflow imports work in my anaconda environment. I am pretty confused about these environments.</p>
  
  <p>Here is my code</p>
  
  <pre><code>from django.db.models import Avg,Sum
  from django.db.models.functions import TruncDate
  
  import pandas as pd
  import tensorflow as tf
  import matplotlib as mpl
  import matplotlib.pyplot as plt
  
  # Create your views here.
  
  from myapp.models import Order
  
  
  
  orders = Order.objects.all().annotate(date = TruncDate('timestamp')).values('itemName','date').annotate(itemPrice = Avg('itemPrice'),quantity=Sum('quantity'),orderPrice = Sum('orderPrice'))
  df = pd.DataFrame(list(orders))
  </code></pre>