卸载Azure功能中的软件包
我的Azure函数应用程序(Python)正在抛出一个例外:模块键入没有属性“ _classvar”。解决此问题的方法是卸载Dataclasses软件包。如何使用PIP卸载此软件包在Python Azure函数上?
如果我运行PIP卸载Dataclasses
,这会反映出部署吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用的是Python版本3.7或更高版本,则需要使用相同的
pip卸载DataClasses
来卸载dataclass
库。因为数据级包是
python 3.7
dataclass
功能的备份。或者, 如果您仍然想存在
dataclasses
您可以将Python版本降级到3.6。有关更多信息,请参阅以下链接:
samel github问题 P>
If you are using python version 3.7 or greater you need to uninstall the
dataclass
library using the samepip 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:
Blog|AttributeError: module ‘typing’ has no attribute ‘_ClassVar’ with Tune
Similar GitHub Issue
我也遇到了很多麻烦,试图从具有Python 3.7环境的Azure DevOps管道部署Azure功能,因此我决定将其放置在此处,因为它可能会帮助其他人遇到相同问题。
您需要使用各自的变量来准备以下YAML文件。
这些是安装需求之后的关键线。txt。这些将从网站包装文件夹中删除包装。
PIP卸载Dataclasses
由于您不在正确的文件夹中而行不通。希望这有帮助!
I was also having a lot of trouble trying to deploy azure functions from an Azure Devops pipeline with a Python 3.7 environment, so I decided to place this here as it might help someone else with the same problem.
You need to prepare the following yaml file with your respective variables.
These are the key lines after installing the requirements.txt. These will remove the package from the site-packages folder.
pip uninstall dataclasses
will not work because you are not in the right folder.Hope this helps!