[ERROR]pip insall pyodbc
- 错误代码如下:
- pip install pyodbc
- Looking in indexes: http://172.16.1.250/repository/douban/simple
- Collecting pyodbc
- Downloading http://172.16.1.250/repository/douban/packages/31/14/124da4b15df927c8a9192c44a42523e289e5a815acd437fd5ce5c2cbc515/pyodbc-4.0.28.tar.gz (264 kB)
- |████████████████████████████████| kB 38.4 MB/s
- Installing collected packages: pyodbc
- Running setup.py install for pyodbc ... error
- ERROR: Command errored out with exit status :
- command: /root/.pyenv/versions/3.7./envs/flask-env-3.7./bin/python3. -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-v979njx5/pyodbc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-v979njx5/pyodbc/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-68v8gv98/install-record.txt --single-version-externally-managed --compile --install-headers /root/.pyenv/versions/3.7./envs/flask-env-3.7./include/site/python3./pyodbc
- cwd: /tmp/pip-install-v979njx5/pyodbc/
- Complete output ( lines):
- running install
- running build
- running build_ext
- building 'pyodbc' extension
- creating build
- creating build/temp.linux-x86_64-3.7
- creating build/temp.linux-x86_64-3.7/src
- gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPYODBC_VERSION=4.0. -I/root/.pyenv/versions/3.7./envs/flask-env-3.7./include -I/root/.pyenv/versions/3.7./include/python3.7m -c src/buffer.cpp -o build/temp.linux-x86_64-3.7/src/buffer.o -Wno-write-strings
- gcc: error trying to exec 'cc1plus': execvp: No such file or directory
- error: command 'gcc' failed with exit status
- ----------------------------------------
- ERROR: Command errored out with exit status : /root/.pyenv/versions/3.7./envs/flask-env-3.7./bin/python3. -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-v979njx5/pyodbc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-v979njx5/pyodbc/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-68v8gv98/install-record.txt --single-version-externally-managed --compile --install-headers /root/.pyenv/versions/3.7./envs/flask-env-3.7./include/site/python3./pyodbc Check the logs for full command output.
- 安装 gcc-c-c++
- yum install -y gcc-c++
- 继续报错
- (flask-env-3.7.) [root@controller flask-env-3.7.]# pip3 install pyodbc
- Looking in indexes: http://172.16.1.250/repository/douban/simple
- Collecting pyodbc
- Downloading http://172.16.1.250/repository/douban/packages/31/14/124da4b15df927c8a9192c44a42523e289e5a815acd437fd5ce5c2cbc515/pyodbc-4.0.28.tar.gz (264 kB)
- |████████████████████████████████| kB 52.1 MB/s
- Installing collected packages: pyodbc
- Running setup.py install for pyodbc ... error
- ERROR: Command errored out with exit status :
- command: /root/.pyenv/versions/3.7./envs/flask-env-3.7./bin/python3. -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ks9xm6sj/pyodbc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ks9xm6sj/pyodbc/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-5nfyd0a8/install-record.txt --single-version-externally-managed --compile --install-headers /root/.pyenv/versions/3.7./envs/flask-env-3.7./include/site/python3./pyodbc
- cwd: /tmp/pip-install-ks9xm6sj/pyodbc/
- Complete output ( lines):
- running install
- running build
- running build_ext
- building 'pyodbc' extension
- creating build
- creating build/temp.linux-x86_64-3.7
- creating build/temp.linux-x86_64-3.7/src
- gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPYODBC_VERSION=4.0. -I/root/.pyenv/versions/3.7./envs/flask-env-3.7./include -I/root/.pyenv/versions/3.7./include/python3.7m -c src/buffer.cpp -o build/temp.linux-x86_64-3.7/src/buffer.o -Wno-write-strings
- In file included from src/buffer.cpp:::
- src/pyodbc.h::: fatal error: sql.h: No such file or directory
- #include <sql.h>
- ^
- compilation terminated.
- error: command 'gcc' failed with exit status
- ----------------------------------------
- ERROR: Command errored out with exit status : /root/.pyenv/versions/3.7./envs/flask-env-3.7./bin/python3. -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ks9xm6sj/pyodbc/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ks9xm6sj/pyodbc/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-5nfyd0a8/install-record.txt --single-version-externally-managed --compile --install-headers /root/.pyenv/versions/3.7./envs/flask-env-3.7./include/site/python3./pyodbc Check the logs for full command output.
- 安装 unixODBC-devel
- yum install -y unixODBC-devel
- 完美解决
- (flask-env-3.7.) [root@controller flask-env-3.7.]# pip3 install pyodbc
- Looking in indexes: http://172.16.1.250/repository/douban/simple
- Collecting pyodbc
- Downloading http://172.16.1.250/repository/douban/packages/31/14/124da4b15df927c8a9192c44a42523e289e5a815acd437fd5ce5c2cbc515/pyodbc-4.0.28.tar.gz (264 kB)
- |████████████████████████████████| kB 21.1 MB/s
- Installing collected packages: pyodbc
- Running setup.py install for pyodbc ... done
- Successfully installed pyodbc-4.0.
[ERROR]pip insall pyodbc的更多相关文章
- pip 安装 lxml 出错
用pip安装 lxml 老是出错,在公司安装了 wheel,从 http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml 下载了lxml的whl包,pip ins ...
- Ubuntu12.10下Python(pyodbc)访问SQL Server解决方案
一.基本原理 请查看这个网址,讲得灰常详细:http://www.jeffkit.info/2010/01/476/ 二.实现步骤 1.安装linux下SQL Server的驱动程序 安装Free ...
- robotframwork数据库测试(一)——pymysql与pyodbc
本章节仅总结一下使用pymysql与pyodbc链接MySQL数据库. 2个都可以链接mysql数据,进行增删改查.但是呢,使用pyodbc操作数据库,对中文支持度好一些.pymysql则需要处理一下 ...
- Python3.x:pyodbc连接Sybase数据库操作(Windows系统下DNS模式)
Python3.x:pyodbc连接Sybase数据库操作(Windows系统下DNS模式) 一.安装模块pyodbc pip install pyodbc 二.配置odbc数据源 (1).windo ...
- pyodbc连接MySQL数据库
1:Python安装pyodbc:pip install pyodbc 2:安装unixODBC-2.3.4.tar.gz ./configure make make install 3:下载基于py ...
- python相关——如何安装pip
今天在新的一台电脑上安装了pip.流程有点忘记了,在这里再次记录下来. 本教程基于python3.4,并且需要连接互联网,总共需要两步. 1.要安装pip,首先要安装setuptools,链接:htt ...
- python使用pip安装第三方模块遇到的问题及解决方法
python使用pip安装第三方模块遇到的问题及解决方法 关注公众号"轻松学编程"了解更多. 使用国内源: 清华:https://pypi.tuna.tsinghua.edu.cn ...
- win10下安装scrapy出现错误的处理
一.背景: 在win10的dos窗口下使用命令pip install scrapy安装scrapy时,出现“ error: Microsoft Visual C++ 14.0 is required. ...
- MySQL ODBC for Linux
参考自http://blog.csdn.net/allens_zhou/article/details/8575400 centos7 64bit [IP:192.168.0.100] yum ins ...
随机推荐
- 基于mysql的单据号生成(前缀+日期+自增id+后缀)
介绍 本次采用mysql处理,性能不是很好,对于高并发有要求的建议不要采用公司一个小项目,需要生成一个单据号,格式为: 日期 + 每日重新自增号,自己考虑了一下每日自增需要考虑并发和持久问题,两种数据 ...
- 带限制的广搜 codeforces
You are playing some computer game. One of its levels puts you in a maze consisting of n lines, each ...
- Nginx模块讲解
Nginx模块分为:nginx官方模块.第三方模块 通过nginx -V查看编译参数,可以看到官方编译的模块 --with-compat --with-file-aio --with-threads ...
- java byte/short/char补充(了解)
1.在数学运算中会自动提升数据类型为 int 2.在基本赋值中,若右册的常量不超过取值范围,javac 添加 强制转换,否则报错 3.若右册 含有 变量 而不是直接使用常量相加,编译报错 例子 pub ...
- StampedLock的理解和使用
StampedLock介绍 StampedLock是为了优化可重入读写锁性能的一个锁实现工具,jdk8开始引入 相比于普通的ReentranReadWriteLock主要多了一种乐观读的功能 在API ...
- vwmare 十月第 1 弹
step one 不管 是 ubuntu 还是 win vm tools 都是需要在虚拟的系统里面的去安装的. 这一点是相同的.
- json的结构和表示方式(对象object、数组array)
json简单说就是javascript中的对象和数组,所以这两种结构就是对象和数组两种结构,通过这两种结构可以表示各种复杂的结构 1.对象:对象在js中表示为“{}”括起来的内容,数据结构为 {key ...
- C语言的安装及使用
安装 vc6.0 使用方法 new --- win32 Console Application --- ok-ok ------c++ Source File ------ ...
- 《Kubernetes权威指南》01_Kubernetes入门——Kubernetes 是什么
01_Kubernetes入门 li {list-style-type:decimal;}.wiz-editor-body ol.wiz-list-level2 > li {list-style ...
- 如何更改cmd 编码为UTF-8
如何将cmd编码改为UTF—8 如图输入chcp 65001即可更改 改完之后是这样的 更改回GBK 输入 CHCP 936即可