问题遇到的现象和发生背景
连接sqlserver,需要使用pymssql,但是mac使用pip install pymssql安装时报错
运行结果及报错内容
Collecting pymssql
Using cached pymssql-2.2.4.tar.gz (169 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pymssql
Building wheel for pymssql (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pymssql (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
setup.py: platform.system() => Darwin
setup.py: platform.architecture() => ('64bit', '')
setup.py: platform.libc_ver() => ('', '')
setup.py: include_dirs => []
setup.py: library_dirs => []
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.13-x86_64-3.9
creating build/lib.macosx-10.13-x86_64-3.9/pymssql
copying src/pymssql/init.py -> build/lib.macosx-10.13-x86_64-3.9/pymssql
running build_ext
creating build/temp.macosx-10.13-x86_64-3.9
creating build/temp.macosx-10.13-x86_64-3.9/src
creating build/temp.macosx-10.13-x86_64-3.9/src/pymssql
src/pymssql/_mssql.c:688:10: fatal error: 'sqlfront.h' file not found
#include "sqlfront.h"
^~~~~~~~~~~~
1 error generated.
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: Failed building wheel for pymssql
Failed to build pymssql
ERROR: Could not build wheels for pymssql, which is required to install pyproject.toml-based projects