跑步的时候pip install pyodbc,我明白了
In file included from .../build/pyodbc/src/buffer.cpp:12:
.../build/pyodbc/src/pyodbc.h:52:10: fatal error: 'sql.h' file not found
#include <sql.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
似乎Mavericks在/ usr/include下没有sql.h
有没有人设法安装pyodbc?有一个已知的解决方法吗?
我尝试在 macOS(12.3.1) 上使用 pip 安装 pyodbc,但这不起作用。
\n在错误日志中,消息显示“致命错误:找不到'sql.h'文件”。有些人得到了命令的帮助brew install unixodbc。我确实跑了brew install unixodbc,但错误仍然出现。
我的环境:\nMacbook pro M1\npip (22.0.4)\nPython (3.10)\npyenv (2.2.5)
\n我很抱歉英语蹩脚,对 python 的理解也很差。
\n% pip3 install pyodbc \n\nCollecting pyodbc\n Using cached pyodbc-4.0.32.tar.gz (280 kB)\n Preparing metadata (setup.py) ... done\nBuilding wheels for collected packages: pyodbc\n Building wheel for pyodbc (setup.py) ... error\n error: subprocess-exited-with-error\n \n \xc3\x97 python setup.py bdist_wheel did not run successfully.\n \xe2\x94\x82 exit code: 1\n \xe2\x95\xb0\xe2\x94\x80> [14 lines of output]\n running bdist_wheel\n running build\n …Run Code Online (Sandbox Code Playgroud)