ModuleNotFoundError: No module named ‘typing_extensions’

We Are Going To Discuss About ModuleNotFoundError: No module named ‘typing_extensions’. So lets Start this Python Article.

ModuleNotFoundError: No module named ‘typing_extensions’

  1. How to solve ModuleNotFoundError: No module named 'typing_extensions'

    There must be an import from typing-extensions module in blog\views.py file on line 1
    in your code.
    Use this command to install it
    pip install typing-extensions
    after that this issue will be resolved.

  2. ModuleNotFoundError: No module named 'typing_extensions'

    There must be an import from typing-extensions module in blog\views.py file on line 1
    in your code.
    Use this command to install it
    pip install typing-extensions
    after that this issue will be resolved.

Solution 1

There must be an import from typing-extensions module in blog\views.py file on line 1

in your code.
Use this command to install it

pip install typing-extensions

after that this issue will be resolved.

Original Author Faisal Nazik Of This Content

Solution 2

I had the same error.

Mine came from models.py

models.py

from typing_extensions import Required
from django.db import models


class nameOfModel(models.Model):
    nameOfField = models.CharField(max_length=255, Required=True)

Because I used Required=True, VSCode added automatically from typing_extensions import Required.

So I did this instead.

models.py

from django.db import models


class nameOfModel(models.Model):
    nameOfField = models.CharField(max_length=255, blank=False)

Original Author AnonymousUser Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment