You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building wheels for collected packages: pyodbc
Building wheel for pyodbc (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyodbc (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [37 lines of output]
WARNING: '' not a valid package name; please use only .-separated package names in setup.py
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-312
copying src/pyodbc.pyi -> build/lib.linux-x86_64-cpython-312
running build_ext
building 'pyodbc' extension
creating build/temp.linux-x86_64-cpython-312/src
x86_64-linux-gnu-g++ -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DPYODBC_VERSION=4.0.39 -I/opt/archery/venv4archery/include -I/usr/include/python3.12 -c src/buffer.cpp -o build/temp.linux-x86_64-cpython-312/src/buffer.o -Wno-write-strings
In file included from src/pyodbc.h:172,
from src/buffer.cpp:12:
src/pyodbccompat.h: In function‘PyObject* Text_New(Py_ssize_t)’:
src/pyodbccompat.h:75:12: error: ‘PyUnicode_FromUnicode’ was not declared in this scope; did you mean ‘PyUnicode_FromString’?
75 |return PyUnicode_FromUnicode(0, length);| ^~~~~~~~~~~~~~~~~~~~~
| PyUnicode_FromString
src/pyodbccompat.h: In function‘Py_UNICODE* Text_Buffer(PyObject*)’:
src/pyodbccompat.h:86:12: error: ‘PyUnicode_AS_UNICODE’ was not declared in this scope; did you mean ‘PyUnicode_AsUCS4’?
86 |return PyUnicode_AS_UNICODE(o);| ^~~~~~~~~~~~~~~~~~~~
| PyUnicode_AsUCS4
src/pyodbccompat.h: In function‘Py_ssize_t Text_Size(PyObject*)’:
src/pyodbccompat.h:126:40: error: ‘PyUnicode_GET_SIZE’ was not declared in this scope; did you mean ‘PyDict_GET_SIZE’?
126 |return (o && PyUnicode_Check(o)) ? PyUnicode_GET_SIZE(o) : 0;| ^~~~~~~~~~~~~~~~~~
| PyDict_GET_SIZE
src/pyodbccompat.h: In function‘Py_ssize_t TextCopyToUnicode(Py_UNICODE*, PyObject*)’:
src/pyodbccompat.h:146:26: error: ‘PyUnicode_GET_SIZE’ was not declared in this scope; did you mean ‘PyDict_GET_SIZE’?
146 | Py_ssize_t cch = PyUnicode_GET_SIZE(o);| ^~~~~~~~~~~~~~~~~~
| PyDict_GET_SIZE
src/pyodbccompat.h:147:24: error: ‘PyUnicode_AS_UNICODE’ was not declared in this scope; did you mean ‘PyUnicode_AsUCS4’?
147 | memcpy(buffer, PyUnicode_AS_UNICODE(o), cch * sizeof(Py_UNICODE));| ^~~~~~~~~~~~~~~~~~~~
| PyUnicode_AsUCS4
error: command'/usr/bin/x86_64-linux-gnu-g++' 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 pyodbc
Failed to build pyodbc
ERROR: Could not build wheels for pyodbc, which is required to install pyproject.toml-based projects
版本
1.11.3
部署方式
手工部署
是否还有其他可以辅助定位问题的信息?比如数据库版本等
这是因为Readme里用了别的项目的python兼容图标?
不注释掉pyodbc所在行,requirements.txt安装不下去。
pyodbc可以升到5.x吗?(我没MSSQL需求,但现在是整体初始化失败。
Ubuntu24原生Python3.12,早知道,给装个低版本Python了。
The text was updated successfully, but these errors were encountered:
huangsijun17
changed the title
依赖的pyodbc默认版本4.0.*与标称的Python版本不兼容
项目依赖的pyodbc默认版本4.0.*与项目标称的Python版本不兼容
Jan 14, 2025
重现步骤
预期外的结果
初始化本项目时,pip安装模块失败。
日志文本
版本
1.11.3
部署方式
手工部署
是否还有其他可以辅助定位问题的信息?比如数据库版本等
这是因为Readme里用了别的项目的python兼容图标?
The text was updated successfully, but these errors were encountered: