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

报错:import pymssql ImportError: libsybdb.so.5

时间:2018-01-12 00:05:04      阅读:801      评论:0      收藏:0      [点我收藏+]

标签:sudo   运行程序   problems   ubuntu   ems   source   世界   装包   文件   

在python3.6的环境下安装pymssql安装包,运行程序时报错:import pymssql ImportError: libsybdb.so.5
在网上搜索了一大圈很多都是讲文件存在但是没有添加软链接。但是我搜索了以一下自己的系统,find / -name libsybdb 发现没有任何信息。
同事在安装好的机器上测试,发现也没有该文件,但是导入pymssql并没有发生报错的情况。

后来想到去官网上看了一眼,豁然开朗。
第一步:
pip install pymssql

第二步:安装 FreeTDS

FreeTDS is required. On some platforms, we provide a pre-compiled FreeTDS to make installing easier, but you may want to install FreeTDS before doing pip install pymssql if you run into problems or need features or bug fixes in a newer version of FreeTDS. You can build FreeTDS from source if you want the latest. If you’re okay with the latest version that your package manager provides, then you can use your package manager of choice to install FreeTDS. E.g.:

Ubuntu/Debian:
sudo apt-get install freetds-dev

安装了一下,世界都安静了。

果然还是官方文档靠谱,还是英语学好靠谱!下午浪费了那么多时间,为什么自己就没有想到早点去官网看一眼呢!教训真是深刻。

报错:import pymssql ImportError: libsybdb.so.5

标签:sudo   运行程序   problems   ubuntu   ems   source   世界   装包   文件   

原文地址:https://www.cnblogs.com/everfight/p/bug_fix.html

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