在Mac OS X Yosemite上安装pymssql时出错 [英] Error Installing pymssql on Mac OS X Yosemite
问题描述
在OS X Yosemite 10.10.3上安装pymssql时收到以下错误-有人遇到以下错误吗?我正在使用FreeTDS(v0.91.112)7.1版和Python 2.7.6-tsql实用程序可以毫无问题地连接到SQL数据库.
I receive the following error when installing pymssql on OS X Yosemite 10.10.3 - has anyone gotten around the following error? I am using FreeTDS (v0.91.112) version 7.1 and Python 2.7.6 - the tsql utility connects to a SQL Database with no issue.
sudo pip install pymssql
错误:
Command "/usr/bin/python -c "import setuptools, tokenize;
__file__='/private/tmp/pip-build-T5Usla/pymssql/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n',
'\n'), __file__, 'exec'))" install --record /tmp/pip-uZGqK4-record/install-
record.txt --single-version-externally-managed --compile" failed with error
code 1 in /private/tmp/pip-build-T5Usla/pymssql
推荐答案
通过执行以下三个步骤,您应该能够在Mac上为Azure SQL DB安装pymmsql.
You should be able to install pymmsql on your Mac for Azure SQL DB by following these three steps.
第1步:安装自制软件 转到终端并运行以下命令:
Step 1: Install Homebrew Go to your terminal and run the following command :
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
第2步:安装FreeTDS. 从终端运行以下命令:
Step 2 : Install FreeTDS. From the terminal run the following command :
brew install freetds
这应该在您的系统上安装freetds
This should install freetds on your system
第3步:安装pymmsql.在终端上运行以下命令
Step 3 : Install pymmsql. From the terminal run the following command
sudo -H pip install pymssql
现在,您应该能够使用pymssql连接到Azure SQL DB和SQL Server.
Now you should be able to use pymssql to connect to Azure SQL DB and SQL Server.
这篇关于在Mac OS X Yosemite上安装pymssql时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!