Hi @Sirivella Zephaniah ,
Thank you for your response. If you’re using a Conda environment, make sure to activate the correct environment before installing the package. If the issue persists, you might want to check your Python path and ensure its pointing to the correct environment where ‘pyodbc’ is installed.
I tried to repro with Miniconda and it was working fine for me.
Please see below script:
Miniconda execution Result:
Before executing above pyodb.py script, which consists of import statement, try to create a project environment using a YAML file. Sample YAML file as shown below: conda_env_v_1_0_yaml.txt.txt
If you want to create a new environment, you can run below command:
conda env create -f conda_env_v_1_0.yml
If you intend to use the newly created project_environment_pyodb, you can activate it using the following command:
conda activate project_environment_pyodb
To fix the missing libodbc.so.2 error, install the unixodbc-dev package. If the problem persists, verify the library's correct installation location, and if needed, install it manually.
Hope this helps.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful.