![](/img/trans.png)
[英]Python API sentinelsat HTTP status 500 Internal Server Error:
[英]Azure Functions Python Status: 500 Internal Server Error
Exception: ModuleNotFoundError: No module named 'pandas'
Stack: File "/azure-functions-host/workers/python/3.6/LINUX/X64/azure_functions_worker/dispatcher.py", line 242, in _handle__function_load_request
func_request.metadata.entry_point)
File "/azure-functions-host/workers/python/3.6/LINUX/X64/azure_functions_worker/loader.py", line 66, in load_function
mod = importlib.import_module(fullmodname)
File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/site/wwwroot/HttpExample/__init__.py", line 9, in <module>
import pandas as pd
在线运行时,我在 Azure 函数上收到此错误。 有一个 requirements.txt 文件,其中包含 pandas 要求,但它仍然设法找不到模块名称 pandas。 在本地 function 工作正常。
根据评论中的对话,我不确定问题是什么。 但是我发布了我刚才所做的所有步骤供您参考,我按照以下步骤操作,它没有显示有关导入 pandas 的错误消息。
pip install pandas
然后在主代码中添加代码“import pandas as pd”并调用pad。
pip freeze > requirements.txt
运行此命令后,我的“requirements.txt”显示如下:
func azure functionapp publish hurypyfun --build remote
希望对你的问题有所帮助~
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.