【发布时间】:2023-10-29 19:13:01
【问题描述】:
我正在尝试在我的 mac 上安装 pyodbc,因为我想连接到一个 sql 服务器,并且我已经通过很多论坛来让它工作。除了 pyodbc 之外的所有东西都已安装(我尝试过 pip、homebrew、easy_istall 甚至尝试使用源代码安装但没有任何效果),它给了我以下错误:
(hhl)OSFOLA-034901:bin henry.humadi$ easy_install pyodbc
Searching for pyodbc
Reading https://pypi.python.org/simple/pyodbc/
Reading http://code.google.com/p/pyodbc
Reading http://code.google.com/p/pyodbc/downloads/list
Best match: pyodbc 3.0.7
Downloading http://pyodbc.googlecode.com/files/pyodbc-3.0.7.zip
Processing pyodbc-3.0.7.zip
Writing /var/folders/w4/h0nc35117x1c0psqpsm4vvlnhk02nh/T/easy_install-AFM6yU/pyodbc-3.0.7/setup.cfg
Running pyodbc-3.0.7/setup.py -q bdist_egg --dist-dir /var/folders/w4/h0nc35117x1c0psqpsm4vvlnhk02nh/T/easy_install-AFM6yU/pyodbc-3.0.7/egg-dist-tmp-G6Yp3F
warning: no files found matching 'tests/*'
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: Setup script exited with error: command 'cc' failed with exit status 1
谁能帮我破译这个错误信息。我在某处读到它与 Xcode 5.1 有关,但我仍然不明白。
提前谢谢你。
【问题讨论】:
-
如果您仍然遇到 pyodbc 问题,那么您可以考虑尝试使用 pypyodbc。过去,它已经为 Mac 用户解决了 pyodbc 的许多问题。