2017-07-06 47 views
1
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-J1I0ox/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 /tmp/pip-qmtdBW-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-J1I0ox/pymssql/ 

表示されているのと同じエラーが表示されます。here私はbrew install freetdsに続いてsudo -H pip install pymssqlを試してそのページの指示に従った。このエラーコード生成MacOSにpymssqlをインストールするにはSierra

:このエラーの検索

_mssql.c:18814:15: error: use of undeclared identifier 'DBVERSION_80' 
    __pyx_r = DBVERSION_80; 
      ^
4 warnings and 1 error generated. 
error: command 'cc' failed with exit status 1 

---------------------------------------- 
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-J1I0ox/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 /tmp/pip-qmtdBW-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-J1I0ox/pymssql/ 

this pageに私をもたらしました。私はsudo -H pip install pymssqlをしようとしたときに別のエラーが発生し、両方のbrew unlink freetds; brew install homebrew/versions/freetds091brew uninstall freetds; brew install homebrew/versions/freetds091を試みることによってそこに掲載ソリューションを追っ:

_mssql.c:266:10: fatal error: 'sqlfront.h' file not found 
#include "sqlfront.h" 
     ^
1 error generated. 
error: command 'cc' failed with exit status 1 

---------------------------------------- 
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/_s/27xppw4j3yl78c9l4v1w3n9m0000gn/T/pip-build-97A9sQ/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/_s/27xppw4j3yl78c9l4v1w3n9m0000gn/T/pip-0nUZo4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/_s/27xppw4j3yl78c9l4v1w3n9m0000gn/T/pip-build-97A9sQ/pymssql/ 

それでは、私はあきらめたとpyodbcをインストールしようとしたが、私はまだ同様のエラーを取得:src/pyodbc.h:56:10: fatal error: 'sql.h' file not found #include sql.h

これに助力があれば助かります。

+0

brew( 'brew install unixodbc')で' unixodbc'をインストールしようとしましたか?あなたには 'sql.h'がありません。 – Zaphod

答えて

13

This link私の問題を解決しました。これらの問題を抱えている人にとっては、この一連のコマンドが私のために働いていました。

brew uninstall --force freetds 
brew install [email protected] 
brew link --force [email protected] 
pip install pymssql 
関連する問題