美文网首页
安装pyhive报错

安装pyhive报错

作者: 随时学丫 | 来源:发表于2020-11-10 11:06 被阅读0次

安装pyhive还需要安装其他依赖包

pip install sasl
pip install thrift
pip install thrift-sasl
pip install PyHive

安装sasl遇到的问题

Collecting sasl
  Using cached https://files.pythonhosted.org/packages/8e/2c/45dae93d666aea8492678499e0999269b4e55f1829b1e4de5b8204706ad9/sasl-0.2.1.tar.gz
Requirement already satisfied: six in /Users/jiang/.local/lib/python3.7/site-packages (from sasl) (1.15.0)
Building wheels for collected packages: sasl
  Running setup.py bdist_wheel for sasl ... error
  Complete output from command /Users/jiang/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/dh/lz2xjpzn5wqdhp6xtbrng_z00000gn/T/pip-install-ykoaejda/sasl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/dh/lz2xjpzn5wqdhp6xtbrng_z00000gn/T/pip-wheel-nihe_8c0 --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.7-x86_64-3.7
  creating build/lib.macosx-10.7-x86_64-3.7/sasl
  copying sasl/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/sasl
  running egg_info
  writing sasl.egg-info/PKG-INFO
  writing dependency_links to sasl.egg-info/dependency_links.txt
  writing requirements to sasl.egg-info/requires.txt
  writing top-level names to sasl.egg-info/top_level.txt
  reading manifest file 'sasl.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'sasl.egg-info/SOURCES.txt'
  copying sasl/saslwrapper.cpp -> build/lib.macosx-10.7-x86_64-3.7/sasl
  copying sasl/saslwrapper.h -> build/lib.macosx-10.7-x86_64-3.7/sasl
  copying sasl/saslwrapper.pyx -> build/lib.macosx-10.7-x86_64-3.7/sasl
  running build_ext
  building 'sasl.saslwrapper' extension
  creating build/temp.macosx-10.7-x86_64-3.7
  creating build/temp.macosx-10.7-x86_64-3.7/sasl
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/jiang/anaconda3/include -arch x86_64 -I/Users/jiang/anaconda3/include -arch x86_64 -Isasl -I/Users/jiang/anaconda3/include/python3.7m -c sasl/saslwrapper.cpp -o build/temp.macosx-10.7-x86_64-3.7/sasl/saslwrapper.o
  clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
  sasl/saslwrapper.cpp:249:10: fatal error: 'string' file not found
  #include <string>
           ^~~~~~~~
  1 error generated.
  error: command 'gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for sasl
  Running setup.py clean for sasl
Failed to build sasl
Installing collected packages: sasl
  Running setup.py install for sasl ... error
    Complete output from command /Users/jiang/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/dh/lz2xjpzn5wqdhp6xtbrng_z00000gn/T/pip-install-ykoaejda/sasl/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/dh/lz2xjpzn5wqdhp6xtbrng_z00000gn/T/pip-record-nkav6rd6/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.7-x86_64-3.7
    creating build/lib.macosx-10.7-x86_64-3.7/sasl
    copying sasl/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/sasl
    running egg_info
    writing sasl.egg-info/PKG-INFO
    writing dependency_links to sasl.egg-info/dependency_links.txt
    writing requirements to sasl.egg-info/requires.txt
    writing top-level names to sasl.egg-info/top_level.txt
    reading manifest file 'sasl.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'sasl.egg-info/SOURCES.txt'
    copying sasl/saslwrapper.cpp -> build/lib.macosx-10.7-x86_64-3.7/sasl
    copying sasl/saslwrapper.h -> build/lib.macosx-10.7-x86_64-3.7/sasl
    copying sasl/saslwrapper.pyx -> build/lib.macosx-10.7-x86_64-3.7/sasl
    running build_ext
    building 'sasl.saslwrapper' extension
    creating build/temp.macosx-10.7-x86_64-3.7
    creating build/temp.macosx-10.7-x86_64-3.7/sasl
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/jiang/anaconda3/include -arch x86_64 -I/Users/jiang/anaconda3/include -arch x86_64 -Isasl -I/Users/jiang/anaconda3/include/python3.7m -c sasl/saslwrapper.cpp -o build/temp.macosx-10.7-x86_64-3.7/sasl/saslwrapper.o
    clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
    sasl/saslwrapper.cpp:249:10: fatal error: 'string' file not found
    #include <string>
             ^~~~~~~~
    1 error generated.
    error: command 'gcc' failed with exit status 1

解决办法,亲测有效

pip install git+https://github.com/JoshRosen/python-sasl.git@fix-build-with-newer-xcode

安装结果

Collecting git+https://github.com/JoshRosen/python-sasl.git@fix-build-with-newer-xcode
  Cloning https://github.com/JoshRosen/python-sasl.git (to revision fix-build-with-newer-xcode) to /private/var/folders/dh/lz2xjpzn5wqdhp6xtbrng_z00000gn/T/pip-req-build-7idssui_
Requirement already satisfied: six in /Users/jiang/.local/lib/python3.7/site-packages (from sasl==0.2.1) (1.15.0)
Building wheels for collected packages: sasl
  Running setup.py bdist_wheel for sasl ... done
  Stored in directory: /private/var/folders/dh/lz2xjpzn5wqdhp6xtbrng_z00000gn/T/pip-ephem-wheel-cache-ghqp6fm8/wheels/d6/9a/bf/25ab3aaf3fb90796e50660cc6188c30336a80736a3729c56ae
Successfully built sasl
Installing collected packages: sasl
Successfully installed sasl-0.2.1

相关文章

  • 安装pyhive报错

    安装pyhive还需要安装其他依赖包 安装sasl遇到的问题 解决办法,亲测有效 安装结果

  • pyhive的安装

    pyhive的安装 impyla连接Hive遇到的坑 安装impala报错及解决办法 以下涉及所有包 Can't ...

  • 安装 pyhive

    linux windows windows安装sasl报错,解决方案 下载对应版本预编译的包https://www...

  • python连接hive

    Python连接hive,我使用pyhive。以下安装流程如下:1、创建虚拟环境(也可以不用创建,但建议创建安装)...

  • (Mac)python hive(pyhive)环境配置踩坑记录

    一、安装过程:一般网上提供的pyhive安装教程(顺序没问题,但安装命令是错误的): 版本见下图: 二、问题记录:...

  • python3执行pip提示找不到

    安装 报错 执行 报错 -bash: pip: command not found安装pip 安装和更新 查看版本

  • OSX下使用rvm升级Ruby

    错误产生 安装 CocoaPods 时报错: 安装命令: 报错: 解决方式 安装 rvm 输入命令: 等待安装结束...

  • 安装node-sass后运行报错

    vue安装node-sass编译报错 安装node-scss报错 安装node-scss报错 在搭建vue脚手架 ...

  • ubuntu(debian)源码安装neovim

    下载源码 编译 出现以下报错 安装cmake 出现以下报错 安装pkg-config 出现以下报错 安装autom...

  • 安装snakemake报错

    安装完anaconda3后,安装snakemake,反复报错。 conda安装环境报错:Solving envir...

网友评论

      本文标题:安装pyhive报错

      本文链接:https://www.haomeiwen.com/subject/wfodbktx.html