FIXED - installed Python from Python.org, not from the Microsoft Store. All is well.
https://github.com/Azure/azure-functi...
****
I'm having an issue similar to this one: https://github.com/Azure/azure-functi...
Windows 11
Azure Functions CLI v4.0.5455
Python 3.11.9
Steps to reproduce:
Create a new folder
Using Powershell 7
func new --template "Http Trigger" --name MyHttpTrigger --worker-runtime Python
python -m venv .venv
.\.venv\scripts\Activate.ps1
pip install -r requirements.txt
pip install pyodbc
pip freeze [angle bracket] requirements.py
(angle brackets are banned in youtube descriptions)
In function_app.py add line import pyodbc
(we literally just need to import the library, we don't even do any code!)
func start
This leads to two different errors:
Error in index_function_app. Sys Path: [....loads of locations....] ,python-packages Path exists: False
Worker failed to index functions
Result: Failure Exception: ModuleNotFoundError: No module named 'pyodbc'. Troubleshooting Guide: https://aka.ms/functions-modulenotfound
I've uploaded a YouTube video showing me going through these steps. Any help would be GREATLY appreciated.
On this page of the site you can watch the video online [FIXED] pyodbc + Azure Function issue (Windows 11, Powershell, local dev) with a duration of hours minute second in good quality, which was uploaded by the user Richard Jackson 16 April 2024, share the link with friends and acquaintances, this video has already been watched 250 times on youtube and it was liked by 3 viewers. Enjoy your viewing!