I would like to access SQL Data from Visual Studio Code, following this tutorial Access Azure SQL Database from Visual Studio Code using Python it caught an error when I tried to import pyodbc
with
import pyodbc
the error:
ModuleNotFoundError Traceback (most recent call last)
in
----> 1 import pyodbc
ModuleNotFoundError: No module named 'pyodbc'
I then followed this tutorial: Step 1: Configure development environment for pyodbc Python development to install pyodbc
. I installed the Microsoft ODBC Driver for SQL Server on Windows but the error remained. What is wrong? Is there an alternative way to access SQL data from Visual Studio Code?
Realised it was a bit of a silly question, but just in case someone else has the same issue, using
pip install pyodbc
in the VS Code terminal will solve the 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.