码迷,mamicode.com
首页 > 数据库 > 详细

安装pymssql报错

时间:2021-03-17 14:39:22      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:ati   head   arch   this   direct   comm   sig   sed   linu   

简介:

  pip install pymssql==2.1.3  安装时报错如下:

 

    Running setup.py install for pymssql ... error
    ERROR: Command errored out with exit status 1:
     command: /python/opsmind_env/bin/python3 -u -c import sys, setuptools, tokenize; sys.argv[0] = ‘""‘/tmp/pip-install-rqij1dtx/pymssql_dad898b10fc14c5da9049a1693190425/setup.py‘""‘; __file__=‘""‘/tmp/pip-install-rqij1dtx/pymssql_dad898b10fc14c5da9049a1693190425/setup.py‘""‘;f=getattr(tokenize, ‘""‘open‘""‘, open)(__file__);code=f.read().replace(‘""‘\r\n‘""‘, ‘""‘\n‘""‘);f.close();exec(compile(code, __file__, ‘""‘exec‘""‘)) install --record /tmp/pip-record-g759t7db/install-record.txt --single-version-externally-managed --compile --install-headers /python/opsmind_env/include/site/python3.6/pymssql
         cwd: /tmp/pip-install-rqij1dtx/pymssql_dad898b10fc14c5da9049a1693190425/
    Complete output (21 lines):
    /python/opsmind_env/lib/python3.6/site-packages/setuptools/dist.py:42: DistDeprecationWarning: Do not call this function
      warnings.warn("Do not call this function", DistDeprecationWarning)
    setup.py: platform.system() => Linux
    setup.py: platform.architecture() => (64bit, ELF)
    setup.py: platform.linux_distribution() => (CentOS Linux, 7.8.2003, Core)
    setup.py: platform.libc_ver() => (glibc, 2.17)
    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
    building _mssql extension
    creating build
    creating build/temp.linux-x86_64-3.6
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include -I/python/opsmind_env/include -I/usr/local/python3/include/python3.6m -c _mssql.c -o build/temp.linux-x86_64-3.6/_mssql.o -DMSDBLIB
    _mssql.c:266:22: fatal error: sqlfront.h: No such file or directory
     #include "sqlfront.h"
                          ^
    compilation terminated.
    error: command gcc failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /python/opsmind_env/bin/python3 -u -c import sys, setuptools, tokenize; sys.argv[0] = ‘""‘/tmp/pip-install-rqij1dtx/pymssql_dad898b10fc14c5da9049a1693190425/setup.py‘""‘; __file__=‘""‘/tmp/pip-install-rqij1dtx/pymssql_dad898b10fc14c5da9049a1693190425/setup.py‘""‘;f=getattr(tokenize, ‘""‘open‘""‘, open)(__file__);code=f.read().replace(‘""‘\r\n‘""‘, ‘""‘\n‘""‘);f.close();exec(compile(code, __file__, ‘""‘exec‘""‘)) install --record /tmp/pip-record-g759t7db/install-record.txt --single-version-externally-managed --compile --install-headers /python/opsmind_env/include/site/python3.6/pymssql Check the logs for full command output.

 

  解决方法:

  export PYMSSQL_BUILD_WITH_BUNDLED_FREETDS=1

 

安装pymssql报错

标签:ati   head   arch   this   direct   comm   sig   sed   linu   

原文地址:https://www.cnblogs.com/9527l/p/14544258.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!