在 Mac OS 10.14 上安装 thrift_sasl
Pip install thrift_sasl on Mac OS 10.14
当我通过 pip 安装 thrift_sasl 时。
sudo pip install thrift_sasl
我遇到了一个错误。错误信息如下:
Running setup.py install for sasl ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-6cb6xrs8/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/tmp/pip-record-aqa804ck/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.6
creating build/lib.macosx-10.6-intel-3.6/sasl
copying sasl/__init__.py -> build/lib.macosx-10.6-intel-3.6/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
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'
copying sasl/saslwrapper.cpp -> build/lib.macosx-10.6-intel-3.6/sasl
copying sasl/saslwrapper.h -> build/lib.macosx-10.6-intel-3.6/sasl
copying sasl/saslwrapper.pyx -> build/lib.macosx-10.6-intel-3.6/sasl
running build_ext
building 'sasl.saslwrapper' extension
creating build/temp.macosx-10.6-intel-3.6
creating build/temp.macosx-10.6-intel-3.6/sasl
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -Isasl -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c sasl/saslwrapper.cpp -o build/temp.macosx-10.6-intel-3.6/sasl/saslwrapper.o
warning: include path for stdlibc++ headers not found; pass '-std=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 warning and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
看来我用的是libc++而不是stdlibc++。
如何解决这个问题?
pip install git+https://github.com/JoshRosen/python-sasl.git@fix-build-with-newer-xcode
$ clang --version
Apple clang 版本 11.0.0 (clang-1100.0.33.16)
目标:x86_64-apple-darwin19.4.0
线程模型:posix
安装目录:/Library/Developer/CommandLineTools/usr/bin
当我通过 pip 安装 thrift_sasl 时。
sudo pip install thrift_sasl
我遇到了一个错误。错误信息如下:
Running setup.py install for sasl ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-6cb6xrs8/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/tmp/pip-record-aqa804ck/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-3.6
creating build/lib.macosx-10.6-intel-3.6/sasl
copying sasl/__init__.py -> build/lib.macosx-10.6-intel-3.6/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
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'
copying sasl/saslwrapper.cpp -> build/lib.macosx-10.6-intel-3.6/sasl
copying sasl/saslwrapper.h -> build/lib.macosx-10.6-intel-3.6/sasl
copying sasl/saslwrapper.pyx -> build/lib.macosx-10.6-intel-3.6/sasl
running build_ext
building 'sasl.saslwrapper' extension
creating build/temp.macosx-10.6-intel-3.6
creating build/temp.macosx-10.6-intel-3.6/sasl
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -Isasl -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c sasl/saslwrapper.cpp -o build/temp.macosx-10.6-intel-3.6/sasl/saslwrapper.o
warning: include path for stdlibc++ headers not found; pass '-std=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 warning and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
看来我用的是libc++而不是stdlibc++。 如何解决这个问题?
pip install git+https://github.com/JoshRosen/python-sasl.git@fix-build-with-newer-xcode
$ clang --version Apple clang 版本 11.0.0 (clang-1100.0.33.16) 目标:x86_64-apple-darwin19.4.0 线程模型:posix 安装目录:/Library/Developer/CommandLineTools/usr/bin