Turbodbc installation on Windows 10

2024/10/11 10:23:01

I tried installing turbodbc and it gives me the following error and not sure what's wrong here.

My python version is 3.7

My command line output from Windows 10 Pro.

C:\Users\marunachalam\Downloads>pip install turbodbc

 Collecting turbodbcUsing cached turbodbc-3.3.0.tar.gz (78 kB)Requirement already satisfied: pybind11>=2.2.0 in c:\users\marunachalam\appdata\local\programs\python\python37-32\lib\site-packages (from turbodbc) (2.4.3)Requirement already satisfied: six in c:\users\marunachalam\appdata\local\programs\python\python37-32\lib\site-packages (from turbodbc) (1.13.0)Building wheels for collected packages: turbodbcBuilding wheel for turbodbc (setup.py) ... errorERROR: Command errored out with exit status 1:command: 'c:\users\marunachalam\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MARUNA~1\\AppData\\Local\\Temp\\pip-install-akbat0nu\\turbodbc\\setup.py'"'"'; __file__='"'"'C:\\Users\\MARUNA~1\\AppData\\Local\\Temp\\pip-install-akbat0nu\\turbodbc\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\MARUNA~1\AppData\Local\Temp\pip-wheel-qdxgecq5'cwd: C:\Users\MARUNA~1\AppData\Local\Temp\pip-install-akbat0nu\turbodbc\Complete output (27 lines):warning: BOOST_ROOT enviroment variable not setrunning bdist_wheelrunning buildrunning build_pycreating buildcreating build\lib.win32-3.7creating build\lib.win32-3.7\turbodbccopying turbodbc\api_constants.py -> build\lib.win32-3.7\turbodbccopying turbodbc\connect.py -> build\lib.win32-3.7\turbodbccopying turbodbc\connection.py -> build\lib.win32-3.7\turbodbccopying turbodbc\constructors.py -> build\lib.win32-3.7\turbodbccopying turbodbc\cursor.py -> build\lib.win32-3.7\turbodbccopying turbodbc\data_types.py -> build\lib.win32-3.7\turbodbccopying turbodbc\exceptions.py -> build\lib.win32-3.7\turbodbccopying turbodbc\options.py -> build\lib.win32-3.7\turbodbccopying turbodbc\__init__.py -> build\lib.win32-3.7\turbodbcrunning egg_infowriting turbodbc.egg-info\PKG-INFOwriting dependency_links to turbodbc.egg-info\dependency_links.txtwriting requirements to turbodbc.egg-info\requires.txtwriting top-level names to turbodbc.egg-info\top_level.txtreading manifest file 'turbodbc.egg-info\SOURCES.txt'reading manifest template 'MANIFEST.in'writing manifest file 'turbodbc.egg-info\SOURCES.txt'running build_extbuilding 'turbodbc_intern' extensionerror: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/----------------------------------------ERROR: Failed building wheel for turbodbcRunning setup.py clean for turbodbcFailed to build turbodbc
Answer

Disclaimer : Turbodc installation has problems with python version 3.8+. You will be able to install Turbodc on python 3.8+, but you'll face another error while using it (https://github.com/blue-yonder/turbodbc/issues/258). So if you want to use Turbodbc, better to stick to python version 3.7 and below. Now lets get Turbodbc installed on your machine

This is going to be a long one. Stay with me -

  1. As the error states, firstly you need 'Microsoft Visual C++ Build Tools'. You'll get it on this page: https://visualstudio.microsoft.com/downloads/. Scroll down to 'Build Tools for Visual Studio'. Download it.

  2. Run the installer. Select 'C++ build tools' to install. Make sure to choose 'Windows 10 (or whatever version you prefer) SDK' as well to prevent this error later - https://github.com/openssl/openssl/issues/586

  3. After installing build tools if you try to install Turbodbc (pip install turbodbc), you'll see another error - python fatal error C1083: Cannot open include file: 'boost/locale.hpp'. Which is to say the battle is half won. To resolve this error follow the steps listed here - https://github.com/blue-yonder/turbodbc/issues/236. For your ease, I'll copy them below -

  4. Download boost from https://www.boost.org/ (click on the "Current Release" version link, in my case "Version 1.72.0", then download the Windows zip file).

  5. Unzip the zipfile somewhere on your PC.

  6. In a command prompt, navigate to the boost top-level directory.

  7. Run .\bootstrap.bat (this generates the b2 executable)

  8. Run .\b2 (this generates the stage directory and contents, takes a few minutes to run)

  9. Set the BOOST_ROOT env variable with something like set BOOST_ROOT=C:\your\path\to\boost\boost_1_72_0\boost_1_72_0

  10. Run pip install turbodbc

That's all. Turbodbc should now be installed in your machine.

https://en.xdnf.cn/q/118337.html

Related Q&A

how to convert a text into tuples in a list in python

I am a beginner in python and desperately need someones help.I am trying to convert a text into tuples in a list. The original text was already tokenized and each pos was tagged as below:The/DT Fulton/…

Trying to call a function within class but its not working [duplicate]

This question already has answers here:TypeError: attack() missing 1 required positional argument: self(2 answers)Closed 3 years ago.I am trying to call a function but its not working. here is the code…

Tkinter Label not showing Int variable

Im trying to make a simple RPG where as you collect gold it will be showed in a label, but it doesnt!! Here is the code:def start():Inv=Tk()gold = IntVar(value=78)EtkI2=Label(Inv, textvariable=gold).pa…

How to refer a certain place in a line in Python

I have this little piece of code:g = open("spheretop1.stl", "r") m = open("morelinestop1.gcode", "w") searchlines = g.readlines() file = "" for i, line…

List comprehension output is None [duplicate]

This question already has answers here:Python list comprehension: list sub-items without duplicates(6 answers)Closed 8 years ago.Im new to python and I wanted to try to use list comprehension but outco…

error while inserting into mysql from python for loop [duplicate]

This question already has answers here:Closed 12 years ago.Possible Duplicate:convert list to string to insert into my sql in one row in python scrapy Is this script correct. I want to insert the scra…

Half of Matrix Size Missing

I wanted to ask why is it that some of my matrices in Python are missing a size value? The matrices/arrays that re defined show the numbers in them, but the size is missing and it is throwing me other…

Clicking Side Panel Elements in Selenium Without IFrames

I want to download U.S. Department of Housing and Urban Development data using Pythons Selenium. Heres my code. import os from selenium import webdriver from webdriver_manager.chrome import ChromeDrive…

Library to extract data from open Excel workbooks

I am trying to extract data from workbooks that are already open. I have found the xlrd library, but it appears you can only use this with workbooks you open through Python. The workbooks I will use in…

Keras apply different Dense layer to each timestep

I have training data in the shape of (-1, 10) and I want to apply a different Dense layer to each timestep. Currently, I tried to achieve this by reshaping input to (-1, 20, 1) and then using a TimeDis…