无法导入'azure.functions'pylint(导入错误)[3,1]和无法导入'__app__modules.library_finder'pylint(导入错误)[4,1]

问题描述 投票:0回答:1

我正在尝试在Microsoft Azure中测试无服务器的Python Chatbot API,但是当我遵循在线指南https://towardsdatascience.com/creating-a-serverless-python-chatbot-api-in-microsoft-azure-from-scratch-in-9-easy-steps-2f1913fc9581

它给出以下错误:无法导入“ azure.functions” pylint(导入错误)[3,1]无法导入'__app__modules.library_finder'pylint(导入错误)[4,1]

知道如何解决这个问题?

关于玉岛

visual-studio-code importerror pylint
1个回答
0
投票

此错误来自pylint。看来linter没有指向.env,因此无法验证Azure软件包!要解决它,您可以尝试以下方法:

在Visual Studio代码中:

  • 在状态栏中找到Python版本,然后单击它
  • 选择项目所在的Azure工作区
  • 将显示Python版本列表。选择一个以./.venv/开头的文件(以我为例:./。venv / bin / python)
  • 然后您可能会得到一个弹出窗口,提示未安装Linter pylint。
  • 单击“安装”按钮进行安装,应该就可以了。>
  • 希望这会有所帮助

© www.soinside.com 2019 - 2024. All rights reserved.