mac安装pymssql报错
使用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
╰─>
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
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/opt/openssl/include -I/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/pymssql/_mssql.c -o build/temp.macosx-10.13-x86_64-3.9/src/pymssql/_mssql.o -DMSDBLIB
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
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 pymysql 本帖最后由 isdkz 于 2022-2-22 13:53 编辑
你确定你要安装的是 pymssql?
pymssql 是 python 用来连接 Microsoft SQL Server 的,
而 Microsoft SQL Server 是在 Windows 上的,
如果是要连接 mysql 的话,用 pymysql 或 mysqlclient isdkz 发表于 2022-2-22 11:49
你确定你要安装的是 pymssql?
pymssql 是 python 用来连接 Microsoft SQL Server 的,
我就是需要连接sql server数据库,不是mysql数据库
mac上使用python没有办法连接sql server数据库吗? 逃兵 发表于 2022-2-22 11:37
pymysql
我想连sql server数据库,不是mysql数据库 星星点灯826 发表于 2022-2-22 13:43
我就是需要连接sql server数据库,不是mysql数据库
mac上使用python没有办法连接sql server数据库吗?
mac 上安装 pymssql 失败你可以看一下这个:
https://blog.csdn.net/ahi77841/article/details/101258415
或者下载编译好的安装:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pymssql isdkz 发表于 2022-2-22 13:52
mac 上安装 pymssql 失败你可以看一下这个:
https://blog.csdn.net/ahi77841/article/details/101258 ...
谢谢啦,我没提示让装freetds,而且装freetds也会装失败的,都装不上
页:
[1]