0

I would like to use pyodbc, but I seems to not get to Library on Explorer. I have done "import pyodbc" and "pip install -r requirements.txt"

I see "pyodbc-4.0.32.dist-info" folder in C:\Users\kenny\AppData\Local\Programs\Python\Python37\Lib\site-packages

But I don't see in Visual Studio and getting errors from missing pyodbc.

Please instruct me! Thanks.

enter image description here

Kenny_I
  • 2,001
  • 5
  • 40
  • 94

1 Answers1

0

I think the error might be due to python interpreter selection. On Visual Studio Code you can press CTRL + SHIFT + P which will open the command pallet then type in Python: Select Interpreter and select the correct virtual environment. Then try installing the dependencies from requirements.txt. enter image description here

If you run into some issues while selecting the venv, you can refer to this thread How can I set up a virtual environment for Python in Visual Studio Code? If it does not help resolving the issue try updating VS Code and/or Azure Function Extension for VS Code.

ChaitanyaN-MSFT
  • 466
  • 2
  • 5