blue-yonder / turbodbc

Turbodbc is a Python module to access relational databases via the Open Database Connectivity (ODBC) interface. The module complies with the Python Database API Specification 2.0.
http://turbodbc.readthedocs.io/en/latest
MIT License
623 stars 85 forks source link

Can't install `turbodbc` on MacOS using pipenv #353

Closed KevinEsh closed 8 months ago

KevinEsh commented 2 years ago

Brief explanation:

Hi guys, I was trying to install latest versionturbodbc==4.3.5 via pipenv on my MacBook Pro Monterey. I followed steps as docs explains but receive an error while compilation is ongoing. Any kind of help would be greatly appreciated. Thank you in advance.

Steps followed until fail:

  1. Clang preinstalled when macbook was handover: clang --version prints

    Apple clang version 13.0.0 (clang-1300.0.27.3)
    Target: x86_64-apple-darwin21.4.0
    Thread model: posix
    InstalledDir: /Library/Developer/CommandLineTools/usr/bin

    Not sure how ITG team installed clang. I guess they executed this command

  2. Install Homebrew

  3. Install pyenv: brew install pyenv

  4. Install python & pip: pyenv install 3.9.11

  5. Install pipenv: brew install pipenv

  6. Install boost: brew install boost

  7. Install unixodbc: brew install unixodbc

  8. Set-up virtual environment: pipenv --python 3.9.11

  9. Install numpy & pyarrow from internal source: pipenv install numpy pyarrow --index=https://software.a.[...]

  10. Install turbodbc from internal source: pipenv install turbodbc --index=https://software.a.[...]

Error message:

[...]
      ld: warning: directory not found for option '-Lbuild/lib.macosx-12.3-x86_64-3.9'
      ld: library not found for -lturbodbc.cpython-39-darwin
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      error: command '/usr/bin/clang++' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> turbodbc

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Technical details:

OS: macOS 12.3.1 21E258 x86_64 Host: MacBookPro16,1 Kernel: 21.4.0 CPU: Intel i9-9880H (16) @ 2.30GHz GPU: Intel UHD Graphics 630, AMD Radeon Pro 5500M

Nicoretti commented 2 years ago

Hi @KevinEsh

you may want to reevaluate if your issue is fixed with 4.5.4, the following fix https://github.com/blue-yonder/turbodbc/pull/359 may also has addressed your issue.