Installing pyodbc for Python 3.7 on Windows
Installing pyodbc for Python 3.7 on Windows
I am a newbie to python and I need to connect to SQL Server. I run the following command in my DB_Connect.py file. I run python DB_Connect.py from CMD line and it gives error on import pyodbc.
import pyodbc
Pic of error
I then I ran command pip install pyodbc but it give an error saying, "Microsoft Visual C++ 14.0 is required". I installed "Microsoft Visual C++ 2015 Redistributable" to accommodate this because I would need to get a license for a full version. My understanding is that this will work. I still get this error:
pip install pyodbc
Pic of pip install pyodbc err
Do I need to install a full version of Visual C++ or is there a free option? Why doesnt this CMD work with the Redistributable version? How do I get past this step?
PC: windows 7 pro - 64
Python Version: 3.7.0
1 Answer
1
pyodbc wheel files are not yet available for Python 3.7. They have been requested via the GitHub issue here.
You could always revert to Python 3.6 for the time being. Or, if you really need Python 3.7 right now then you'll have to install the required Visual Studio components so pip can build pyodbc from source. Details here.
pip
I then I ran command pip install pyodbc but it give an error saying, "Microsoft Visual C++ 14.0 is required". I installed "Microsoft Visual C++ 2015 Redistributable" to accommodate this
That didn't work because you installed the runtime support for Visual C++. You need the build tools for Visual C++, described here.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.