[ERROR]pip insall pyodbc
2024-09-06 19:37:58
- 错误代码如下:
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.
最新文章
- 自定义Chrome插件Vimium
- ADO总结测试数据库
- Can&#39;t connect to MySQL server on localhost (0)
- iOS开发-pod install 出错 The dependency `AFNetworking (~>; 2.6.0)` is not used in any concrete target.
- ACM算法总结及刷题参考
- ThinkPHP 中M方法和D方法详解----转载
- jsp页面 date转化成string
- [ActionScript 3.0] AS3虚线绘制方法
- div+css登陆界面案例2
- ios loading视图动画(模仿58同城)
- Android Studio 1.0 (稳定版) 完全攻略
- backtrack种子
- [译]ASP.NET Core 2.0 视图引擎
- win10下 github+hexo搭建个人博客.md
- nginx系列8:反向代理和负载均衡原理
- saltstack主机管理项目:编写插件基类-获取主机列表-提取yaml配置文件(四)
- 【Static Program Analysis - Chapter 3】Type Analysis
- 2101244 - FAQ: SAP HANA Multitenant Database Containers (MDC)
- 第六次spring会议
- LeetCode 917 Reverse Only Letters 解题报告