3

django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'django.contrib.admin.templatetags.admin_static': cannot import name 'RemovedInDjango30Warning' from 'django.utils.deprecation' (C:\Users\Gokul\Anaconda3\envs\myDjangoEnv\lib\site-packages\django\utils\deprecation.py)

I'm getting this error, after i update django to 3.2! Any possible solutions would be helpful.

Thanks in advance!

Gokul
  • 31
  • 1
  • 6
  • You seem to have somehow mixed up multiple versions? This file `django.contrib.admin.templatetags.admin_static` is not even present since Django 3.0, try updating again `pip install Django --upgrade --force-reinstall` – Abdul Aziz Barkat Apr 22 '21 at 06:54
  • @AbdulAzizBarkat Thank you so much for your help. It worked out well. It was a mix up between virtual environment and base system. – Gokul Apr 22 '21 at 07:01
  • @AbdulAzizBarkat is there any way to do the same in conda virtual environment. i tried with pip installation. But, it is not working in virtual environment. – Gokul Apr 22 '21 at 07:06
  • `conda update Django --force-reinstall`? https://docs.conda.io/projects/conda/en/latest/commands/update.html – Abdul Aziz Barkat Apr 22 '21 at 07:08
  • I tried. But, the version of django in virual environment was 2.2.20 and it is not changing. So ,i removed the entire virtual environment. Then i ran the server and it worked. Again Thanks for your help @AbdulAzizBarkat – Gokul Apr 22 '21 at 07:25

0 Answers0