-1

how to fix Collecting pyodbc Using cached pyodbc-4.0.32.tar.gz (280 kB) Preparing metadata (setup.py) ... doneBuilding wheels for collected packages: pyodbc Building wheel for pyodbc (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-pduzvow4\pyodbc_6a2cb9d552294608a526333bd147a8c4\setup.py'"'"'; file='"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-pduzvow4\pyodbc_6a2cb9d552294608a526333bd147a8c4\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Hp\AppData\Local\Temp\pip-wheel-ukv030lp' cwd: C:\Users\Hp\AppData\Local\Temp\pip-install-pduzvow4\pyodbc_6a2cb9d552294608a526333bd147a8c4
Complete output (5 lines): running bdist_wheel running build running build_ext building 'pyodbc' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

ERROR: Failed building wheel for pyodbc Running setup.py clean for pyodbc Failed to build pyodbc Installing collected packages: pyodbc Running setup.py install for pyodbc ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-pduzvow4\pyodbc_6a2cb9d552294608a526333bd147a8c4\setup.py'"'"'; file='"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-pduzvow4\pyodbc_6a2cb9d552294608a526333bd147a8c4\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Hp\AppData\Local\Temp\pip-record-6iqibsw_\innally-managed --compile --install-headers 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\Include\pyodbc' cwd: C:\Users\Hp\AppData\Local\Temp\pip-install-pduzvow4\pyodbc_6a2cb9d552294608a526333bd147a8c4
Complete output (5 lines): running install running build running build_ext building 'pyodbc' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ ---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-pduzvow4\pyodbc_6a2cb9d552294608a526333bd147a8c4\setup.py'"'"'; file='"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-pduzvow4\pyodbc_6a2cb9d552294608a526333bd147a8c4\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Hp\AppData\Local\Temp\pip-record-6iqibsw_\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\Include\pyodbc' Check the logs for full command output. PS C:\Users\Hp\Desktop\testing> pip install pyodbc Collecting pyodbc Using cached pyodbc-4.0.32.tar.gz (280 kB) Preparing metadata (setup.py) ... doneBuilding wheels for collected packages: pyodbc Building wheel for pyodbc (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-qh0u8ubs\pyodbc_065570aa41d54e39975cd28d9b1bd1cd\setup.py'"'"'; file='"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-qh0u8ubs\pyodbc_065570aa41d54e39975cd28d9b1bd1cd\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Hp\AppData\Local\Temp\pip-wheel-hgzmffmb' cwd: C:\Users\Hp\AppData\Local\Temp\pip-install-qh0u8ubs\pyodbc_065570aa41d54e39975cd28d9b1bd1cd
Complete output (5 lines): running bdist_wheel running build running build_ext building 'pyodbc' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

ERROR: Failed building wheel for pyodbc Running setup.py clean for pyodbc Failed to build pyodbc Installing collected packages: pyodbc Running setup.py install for pyodbc ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-qh0u8ubs\pyodbc_065570aa41d54e39975cd28d9b1bd1cd\setup.py'"'"'; file='"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-qh0u8ubs\pyodbc_065570aa41d54e39975cd28d9b1bd1cd\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Hp\Anally-managed --compile --install-headers 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\Include\pyodbc' cwd: C:\Users\Hp\AppData\Local\Temp\pip-install-qh0u8ubs\pyodbc_065570aa41d54e39975cd28d9b1bd1cd
Complete output (5 lines): running install running build running build_ext building 'pyodbc' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ ---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-qh0u8ubs\pyodbc_065570aa41d54e39975cd28d9b1bd1cd\setup.py'"'"'; file='"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-qh0u8ubs\pyodbc_065570aa41d54e39975cd28d9b1bd1cd\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Hp\AppData\Local\Temp\pip-record-_x_xavqf\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\Include\pyodbc' Check the logs for full command output. PS C:\Users\Hp\Desktop\testing> pip install pyodbc Collecting pyodbc Using cached pyodbc-4.0.32.tar.gz (280 kB) Preparing metadata (setup.py) ... doneBuilding wheels for collected packages: pyodbc Building wheel for pyodbc (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-z16aosoo\pyodbc_04a9c3beea8a421ea0d1796cca1ec22f\setup.py'"'"'; file='"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-z16aosoo\pyodbc_04a9c3beea8a421ea0d1796cca1ec22f\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Hp\AppData\Local\Temp\pip-wheel-0xd6a19l' cwd: C:\Users\Hp\AppData\Local\Temp\pip-install-z16aosoo\pyodbc_04a9c3beea8a421ea0d1796cca1ec22f
Complete output (5 lines): running bdist_wheel running build running build_ext building 'pyodbc' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

ERROR: Failed building wheel for pyodbc Running setup.py clean for pyodbc
Failed to build pyodbc Installing collected packages: pyodbc Running setup.py install for pyodbc ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-z16aosoo\pyodbc_04a9c3beea8a421ea0d1796cca1ec22f\setup.py'"'"'; file='"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-z16aosoo\pyodbc_04a9c3beea8a421ea0d1796cca1ec22f\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Hp\AppData\Local\Temp\pip-record-0mfty8o5\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\Include\pyodbc' cwd: C:\Users\Hp\AppData\Local\Temp\pip-install-z16aosoo\pyodbc_04a9c3beea8a421ea0d1796cca1ec22f
Complete output (5 lines): running install running build running build_ext building 'pyodbc' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ ---------------------------------------- ERROR: Command errored out with exit status 1: 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-z16aosoo\pyodbc_04a9c3beea8a421ea0d1796cca1ec22f\setup.py'"'"'; file='"'"'C:\Users\Hp\AppData\Local\Temp\pip-install-z16aosoo\pyodbc_04a9c3beea8a421ea0d1796cca1ec22f\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\Hp\AppData\Local\Temp\pip-record-0mfty8o5\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Hp\AppData\Local\Programs\Python\Python310\Include\pyodbc' Check the logs for full command output.

  • https://stackoverflow.com/search?q=%5Bpip%5D+error%3A+Microsoft+Visual+C%2B%2B+14.0+or+greater+is+required – phd Jan 14 '22 at 06:30

1 Answers1

0

I believe pyodbc requires c++ to compile. That's why it's telling you that

Visual C++ 14.0 or greater is required. 
Get it with "Microsoft C++ Build Tools": 
https://visualstudio.microsoft.com/visual-cpp-build-tools/

Another option may be

pip install --only-binary :all: pyodbc
dvr
  • 370
  • 1
  • 9