[英]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.