Anaconda Python:HiveServer2的客户端驱动程序无法安装

时间:2014-12-02 18:48:06

标签: python hive anaconda sasl

尝试在Windows 7 64位上安装pyhs2时出现此错误。我使用CMD.exe来安装软件包,尽管我不是很喜欢它。我已从此link下载了该软件包,并将其放在我的下载目录中。

我目前正在使用Conda 3.7.3

C:\Users\gianluca.rossi>pip install C:\Users\gianluca.rossi\Downloads\pyhs2-0.6.
0.tar.gz
Unpacking c:\users\gianluca.rossi\downloads\pyhs2-0.6.0.tar.gz
  Running setup.py (path:c:\users\gianlu~1.ros\appdata\local\temp\pip-0ukipa-bui
ld\setup.py) egg_info for package from file:///C:/Users/gianluca.rossi/Downloads
/pyhs2-0.6.0.tar.gz

    warning: no files found matching 'ChangeLog'
    warning: no files found matching 'MakeFile'
    warning: no previously-included files matching '*.pyc' found anywhere in dis
tribution
    warning: no previously-included files matching '.gitignore' found anywhere i
n distribution
    warning: no previously-included files matching '.DS_Store' found anywhere in
 distribution
Downloading/unpacking sasl (from pyhs2==0.6.0)
  Downloading sasl-0.1.3.tar.gz
  Running setup.py (path:c:\users\gianlu~1.ros\appdata\local\temp\pip_build_gian
luca.rossi\sasl\setup.py) egg_info for package sasl

Requirement already satisfied (use --upgrade to upgrade): thrift in c:\users\gia
nluca.rossi\appdata\local\continuum\anaconda\lib\site-packages\thrift-0.9.1-py2.
7.egg (from pyhs2==0.6.0)
Installing collected packages: sasl, pyhs2
  Running setup.py install for sasl

    building '_saslwrapper' extension
    C:\Users\gianluca.rossi\AppData\Local\Continuum\Anaconda\Scripts\gcc.bat -DM
S_WIN64 -mdll -O -Wall -Isasl -IC:\Users\gianluca.rossi\AppData\Local\Continuum\
Anaconda\include -IC:\Users\gianluca.rossi\AppData\Local\Continuum\Anaconda\PC -
c sasl/saslwrapper.cpp -o build\temp.win-amd64-2.7\Release\sasl\saslwrapper.o
    sasl/saslwrapper.cpp:21:23: fatal error: sasl/sasl.h: No such file or direct
ory
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    Complete output from command C:\Users\gianluca.rossi\AppData\Local\Continuum
\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\gianlu
~1.ros\\appdata\\local\\temp\\pip_build_gianluca.rossi\\sasl\\setup.py';exec(com
pile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __f
ile__, 'exec'))" install --record c:\users\gianlu~1.ros\appdata\local\temp\pip-s
qckja-record\install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build\lib.win-amd64-2.7

creating build\lib.win-amd64-2.7\sasl

copying sasl\__init__.py -> build\lib.win-amd64-2.7\sasl

copying sasl\saslwrapper.py -> build\lib.win-amd64-2.7\sasl

running egg_info

writing sasl.egg-info\PKG-INFO

writing top-level names to sasl.egg-info\top_level.txt

writing dependency_links to sasl.egg-info\dependency_links.txt

warning: manifest_maker: standard file '-c' not found



reading manifest file 'sasl.egg-info\SOURCES.txt'

reading manifest template 'MANIFEST.in'

writing manifest file 'sasl.egg-info\SOURCES.txt'

running build_ext

building '_saslwrapper' extension

creating build\temp.win-amd64-2.7

creating build\temp.win-amd64-2.7\Release

creating build\temp.win-amd64-2.7\Release\sasl

C:\Users\gianluca.rossi\AppData\Local\Continuum\Anaconda\Scripts\gcc.bat -DMS_WI
N64 -mdll -O -Wall -Isasl -IC:\Users\gianluca.rossi\AppData\Local\Continuum\Anac
onda\include -IC:\Users\gianluca.rossi\AppData\Local\Continuum\Anaconda\PC -c sa
sl/saslwrapper.cpp -o build\temp.win-amd64-2.7\Release\sasl\saslwrapper.o

sasl/saslwrapper.cpp:21:23: fatal error: sasl/sasl.h: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command C:\Users\gianluca.rossi\AppData\Local\Continuum\Anaconda\python.exe -c "
import setuptools, tokenize;__file__='c:\\users\\gianlu~1.ros\\appdata\\local\\t
emp\\pip_build_gianluca.rossi\\sasl\\setup.py';exec(compile(getattr(tokenize, 'o
pen', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install
--record c:\users\gianlu~1.ros\appdata\local\temp\pip-sqckja-record\install-reco
rd.txt --single-version-externally-managed --compile failed with error code 1 in
 c:\users\gianlu~1.ros\appdata\local\temp\pip_build_gianluca.rossi\sasl
Storing debug log for failure in C:\Users\gianluca.rossi\pip\pip.log

从错误消息我明白了问题是没有' sasl / sasl.h'目录,所以我假设这是一个我必须手动安装的包。不幸的是,我在尝试安装' sasl'时看到了相同的错误消息。

$ pip install sasl-0.1.3.tar.gz
Unpacking c:\users\gianluca.rossi\downloads\sasl-0.1.3.tar.gz
  Running setup.py (path:c:\cygwin64\tmp\pip-qkq_jo-build\setup.py) egg_info for package from file:///C:/Users/gianluca.rossi/Downloads/sasl-0.1.3.tar.gz

Installing collected packages: sasl
  Running setup.py install for sasl

    building '_saslwrapper' extension
    C:\Users\gianluca.rossi\AppData\Local\Continuum\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -Isasl -IC:\Users\gianluca.rossi\AppData\Local\Continuum\Anaconda\include -IC:\Users\gianluca.rossi\AppData\Local\Continuum\Anaconda\PC -c sasl/saslwrapper.cpp -o build\temp.win-amd64-2.7\Release\sasl\saslwrapper.o
    sasl/saslwrapper.cpp:21:23: fatal error: sasl/sasl.h: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    Complete output from command C:\Users\gianluca.rossi\AppData\Local\Continuum\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\\cygwin64\\tmp\\pip-qkq_jo-build\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\cygwin64\tmp\pip-ogzt6q-record\install-record.txt --single-version-externally-managed --compile:
    running install

running build

running build_py

creating build

creating build\lib.win-amd64-2.7

creating build\lib.win-amd64-2.7\sasl

copying sasl\__init__.py -> build\lib.win-amd64-2.7\sasl

copying sasl\saslwrapper.py -> build\lib.win-amd64-2.7\sasl

running egg_info

writing sasl.egg-info\PKG-INFO

writing top-level names to sasl.egg-info\top_level.txt

writing dependency_links to sasl.egg-info\dependency_links.txt

warning: manifest_maker: standard file '-c' not found



reading manifest file 'sasl.egg-info\SOURCES.txt'

reading manifest template 'MANIFEST.in'

writing manifest file 'sasl.egg-info\SOURCES.txt'

running build_ext

building '_saslwrapper' extension

creating build\temp.win-amd64-2.7

creating build\temp.win-amd64-2.7\Release

creating build\temp.win-amd64-2.7\Release\sasl

C:\Users\gianluca.rossi\AppData\Local\Continuum\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -Isasl -IC:\Users\gianluca.rossi\AppData\Local\Continuum\Anaconda\include -IC:\Users\gianluca.rossi\AppData\Local\Continuum\Anaconda\PC -c sasl/saslwrapper.cpp -o build\temp.win-amd64-2.7\Release\sasl\saslwrapper.o

sasl/saslwrapper.cpp:21:23: fatal error: sasl/sasl.h: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command C:\Users\gianluca.rossi\AppData\Local\Continuum\Anaconda\python.exe -c "import setuptools, tokenize;__file__='c:\\cygwin64\\tmp\\pip-qkq_jo-build\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\cygwin64\tmp\pip-ogzt6q-record\install-record.txt --single-version-externally-managed --compile failed with error code 1 in c:\cygwin64\tmp\pip-qkq_jo-build
Storing debug log for failure in C:\cygwin64\home\gianluca.rossi\pip\pip.log

1 个答案:

答案 0 :(得分:1)

sasl库是对sasl C库的Python绑定。要进行pip安装(或从源代码安装),您需要先安装sasl C库,以便找到头文件。