pip从码头集装箱内安装pymssql
问题描述:
我的码头集装箱正在使用centos6.6。它无法pip安装pymssql:pip从码头集装箱内安装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上遇到这个问题。
。 。 。
答
看起来,这是由pymssql
版本2.1.1
和2.1.3
之间的某个接口更改引起的。我没有时间来调查的确切原因,但注意到这个问题后留存在centos 7.x
码头工人形象,我能够通过安装pymssql
一个新版本,以解决此问题上:
pip install pymssql==2.1.3
生病仔细检查内核版本,但我会很惊讶,如果它不是3.10 + –
这可能是一个愚蠢的问题,但你想我检查码头集装箱内的内核版本? –
抱歉 - 为了澄清,请检查Docker主机上的规格,以确保存储驱动程序和其他系统与您的版本兼容。内核版本将内部和外部相同 - 因为它是相同的:) – ldg