gpt4 book ai didi

docker - pip 从 docker 容器中安装 pymssql

转载 作者:太空宇宙 更新时间:2023-11-03 17:17:11 25 4
gpt4 key购买 nike

我的 docker 容器使用的是 centos6.6。 pip install pymssql 失败:

Step 15 : RUN pip install pymssql
---> Running in c6a17c43790d
Collecting pymssql
Downloading http://piprepo-au/piprepo/pymssql/pymssql-2.1.1.zip (2.3MB)
Installing collected packages: pymssql
Running setup.py install for pymssql: started
Running setup.py install for pymssql: finished with status 'error'
Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6Tr3gO/pymssql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-DZY29I-record/install-record.txt --single-version-externally-managed --compile:
setup.py: platform.system() => 'Linux'
setup.py: platform.architecture() => ('64bit', '')
setup.py: platform.linux_distribution() => ('CentOS', '6.6', 'Final')
setup.py: platform.libc_ver() => ('glibc', '2.3')
setup.py: Not using bundled FreeTDS
setup.py: include_dirs = ['/usr/local/include']
setup.py: library_dirs = ['/usr/local/lib']
running install
running build
running build_ext
cythoning _mssql.pyx to _mssql.c

Error compiling Cython file:
------------------------------------------------------------
...
return uuid.UUID(bytes_le=(<char *>data)[:length])

else:
return (<char *>data)[:length]

cdef int convert_python_value(self, object value, BYTE **dbValue,
^
------------------------------------------------------------

_mssql.pyx:821:9: Signature not compatible with previous declaration

Error compiling Cython file:
------------------------------------------------------------
...
cdef object msghandler

cpdef cancel(self)
cdef void clear_metadata(self)
cdef object convert_db_value(self, BYTE *, int, int)
cdef int convert_python_value(self, object value, BYTE **, int*, int*) except -1

有人有什么想法吗?我已经尝试了很多东西。我在 ubuntu16 上没有这个问题。

...

最佳答案

这似乎是由 pymssql2.1.12.1.3 之间某处的接口(interface)更改引起的。我没有时间调查确切原因,但在注意到 centos 7.x docker 图像上仍然存在问题后,我能够通过安装较新版本的 pymssql< 解决此问题:

pip install pymssql==2.1.3

关于docker - pip 从 docker 容器中安装 pymssql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38757220/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com