'uninstall packages in azure function

My azure function app(python) is throwing an exception: module typing has no attribute '_classVar'. A fix for this would be to uninstall the dataclasses package. How do I uninstall this package on a python azure function using pip?

If I run pip uninstall dataclasses, will this reflect on deployment?



Solution 1:[1]

If you are using python version 3.7 or greater you need to uninstall the dataclass library using the same pip uninstall dataclasses.

As The dataclasses package is a backport of the Python 3.7 dataclass functionality.

Or, if still you want to exist dataclasses you can downgrade your python version to 3.6.

For more information please refer the below links:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 AjayKumarGhose-MT