title: How to fix pyodbc dependency errors when upgrade Django from 2.1 to 2.2.13?
body: <p>Since version 2.1 has been marked as insecure I need to upgrade at least to &gt;=2.2. Github security suggests installing 2.2.13. I also need to install other packages that only work with Django &gt;=2.2.</p>
  <p>The Django upgrade is successful but when pipenv tries to lock the dependencies I get this error:</p>
  <pre><code>Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  </code></pre>
  <p>I googled this and the only way I stop getting this error is by placing these two dependencies under [dev-packages]:</p>
  <pre><code>django-pyodbc-azure = &quot;&lt;2.1&quot;
  django-pyodbc = &quot;&lt;2.1&quot;
  </code></pre>
  <p>But when I try to run the server I get this:</p>
  <pre><code>ImproperlyConfigured(&quot;Django %d.%d.%d is not supported.&quot; % VERSION[:3])
  django.core.exceptions.ImproperlyConfigured: Django 2.2.13 is not supported.
  </code></pre>
  <p>I also googled this and the solution that shows up is to manually change the conditions for raising this error. I do that and then I get this other error:</p>
  <pre><code>django.core.exceptions.ImproperlyConfigured: 'sql_server.pyodbc' isn't an available database backend.
  Try using 'django.db.backends.XXX', where XXX is one of:
      'mysql', 'oracle', 'postgresql', 'sqlite3'
  </code></pre>
  <p>I googled this too but the solutions that worked for other people didn't work for me. I've been stuck at this point for days. Please send help!</p>
  <p>Other info:
  I am using these two params:</p>
  <pre><code>ENGINE':'sql_server.pyodbc'
  'driver': 'ODBC Driver 17 for SQL Server'
  </code></pre>
  <p><strong>Note:</strong> If you know another way I can use these packages with a newer version of Django please share it.</p>