Diary 1 of My Errors

Catharina Mega
1 min readJan 7, 2022

Unable to install pyodbc in VSCode

Well, I should write this at the beginning, but I think it is still not too late. I got a repetitive error which said ERROR: Command errored out with exit status 1 1while installing pyodbc in VSCode cmd terminal. This happened because I had not installed the wheel in the environment. And also I did not set any wheel in setup.py. At the end, I finally solved the problem by installing the appropriate wheel.

  1. Download and install .whl

For your information, I use Python 3.10 in Windows 10, so I download pyodbc‑4.0.32‑cp310‑cp310‑win_amd64.whl, here is the link https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyodbc

2. Is it solved already? Unfortunately, not. There is another error “ERROR: Failed building wheel for pyodbc”. I realized that my wheel file was not in the same folder as my flask backend file (actually I do not know how I should say it, it is my app.py). I moved the wheel file in the same path with my app.py and run the below command. If you use another wheel file, write your own wheel file name.

pip install pyodbc-4.0.32-cp310-cp310-win_amd64.whl

3. Done! I run pip install pyodbc and it ran well.

--

--