Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux Python Azure Function APP - pyodbc module not found despite being in requirements.txt and other modules working fine

I'm using a Linux consumption plan.

I get the following error; Exception: ModuleNotFoundError: No module named 'pyodbc'

I have added pyodbc in the requirements.txt file and other modules in this file such as azure-storage are working fine.

Has anyone seen this issue or can confirm this is a known bug? I can't see any way to manually install this.

like image 737
David Hawkins Avatar asked Nov 22 '18 09:11

David Hawkins


People also ask

Does Pyodbc work with Python 3?

New! Save questions or answers and organize your favorite content. Learn more.

How do I trigger an azure function in Python?

Create a local function projectSelect Python from the Create New Project dropdown. Select the version of Python or Python environment you want to run your Azure Function project in. Select HTTP trigger as your project template. You will be prompted to select an Authorization level.

Can we use Python in Azure function?

Choose the v2 selector at the top of the article to learn about this new programming model. . While you can develop your Python based Azure Functions locally on Windows, Python is only supported on a Linux based hosting plan when running in Azure. See the list of supported operating system/runtime combinations.


1 Answers

I believe this a bug with the Python worker. I have opened an issue with the team as I am having this issue also. https://github.com/Azure/azure-functions-python-worker/issues/249

like image 170
Montel Edwards Avatar answered Sep 18 '22 20:09

Montel Edwards