問題描述
我想安裝 pyodbc 以使用 sqlalchemy 連接 mssql 服務器我在谷歌上搜索并嘗試了多種方式,例如
I want to install pyodbc for connection mssql server using sqlalchemy I am googling and tried in several ways like
pip install pyodbc
按照此鏈接Pyodbc 安裝錯誤在安裝了 Sql Server 的 Ubuntu 16.04但還沒有解決下面拋出類型錯誤
Followed this link Pyodbc installation error on Ubuntu 16.04 with Sql Server installed but have not solved below type error thrown
src/pyodbc.h:56:17: fatal error: sql.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pyodbc
推薦答案
對于 pyodbc 案例我使用命令
For pyodbc case I used command
sudo apt-get install unixodbc-dev
pip install pyodbc
并且能夠成功安裝pyodbc但面臨我的評論問題(無法將數據推送到mssql服務器)
and able to success pyodbc installation but facing my comment problem (not able to push data into mssql server)
對于 pymssql 我使用了命令
For pymssql i used command
sudo apt-get install freetds-dev
pip install pymssql
然后就可以成功安裝pymssql并將數據插入到mssql服務器
then able to success pymssql installation and data insert into mssql server
這篇關于在 ubuntu 16.04 中安裝 pyodbc 和 pymssql 遇到障礙的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!