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
I get this error on Azure Functions when run online. There is a requirements.txt file which contains the pandas requirement but it still manages to not find the module name pandas. Locally the function works fine.
According to the conversation in comments, I'm not sure what the problem is. But I post all of the steps I did just now for your reference, I follow the steps below and it didn't show the error message about import pandas.
pip install pandas
Then add the code "import pandas as pd" and call the pad in the main code.
pip freeze > requirements.txt
After run this command, my "requirements.txt" show as below:
func azure functionapp publish hurypyfun --build remote
Hope it would be helpful to your problem~
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.