0
我正尝试使用“pip install pyodbc”和“pip install pymssql”来安装pyodbc或pymssql python库。不过,我不断收到以下错误信息:无法在mac sierra上安装pyodbc或pymssql
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/mz/2w0c0vc93bb2qy5rmrnxn85h0000gn/T/pip-build-upWR3q/pymssql/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/mz/2w0c0vc93bb2qy5rmrnxn85h0000gn/T/pip-DUorxp-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/mz/2w0c0vc93bb2qy5rmrnxn85h0000gn/T/pip-build-upWR3q/pymssql/
我已经安装了freetds的,虽然我仍然在安装过程中收到以下消息:
setup.py: Detected Darwin/Mac OS X.
You can install FreeTDS with Homebrew or MacPorts, or by downloading
and compiling it yourself.
Homebrew (http://brew.sh/)
--------------------------
brew install freetds
MacPorts (http://www.macports.org/)
-----------------------------------
sudo port install freetds
setup.py: Not using bundled FreeTDS
任何人有任何想法,为什么会这样呢? 我试过this solution,this solution和this solution。
这是我目前freetds的设置:
Version: freetds v0.91.112
freetds.conf directory: /usr/local/Cellar/[email protected]/0.91.112/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 7.1
iODBC: no
unixodbc: no
SSPI "trusted" logins: no
Kerberos: no
我无法安装了unixODBC之一:
pip install unixodbc
Collecting unixodbc
Could not find a version that satisfies the requirement unixodbc (from versions:)
No matching distribution found for unixodbc
请帮助?
你正在使用什么版本的Python('python --version')?你使用'virtualenv'吗? – FlipperPA