-
Notifications
You must be signed in to change notification settings - Fork 47
Pip install fails on OS X Mojave #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
did u solve it? |
Try conda install |
conda install doesn't work either. |
The problem seems to be in python-sasl. On recent versions of OS X you need to ensure libc++ is being used as the C++ library by specifying it with extra_compile_args. This allows python-sasl to compile and resolves the problem being described above. Here's a fork of python-sasl with the necessary changes - https://github.com/rboyatt/python-sasl/tree/stdlib-osx |
MacOS: brew install gcc@4.9 |
I found a simple workaround: modify the build to target OS X 10.9, which has the side effect of ensuring that libc++ is used: cloudera/python-sasl#13. I originally tried using @rboyatt's suggestion of passing the |
For anybody who wants to use @JoshRosen's fix, you can install it via pip with the following command: |
This worked for me! |
This worked for me
|
It work for me. Thanks. |
I've been trying to install version 0.2.1 on Mojave but it's somehow unhappy with gcc. I installed anaconda and I've tried both in the base environment and created another virtual environment. The error message is below. I get a similar message if I don't specify a version.
I've done the things suggested in this link but it doesn't seem to help: https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojave
Maybe this is relevant: hkwi/python-geohash#27
pip install thrift_sasl==0.2.1
Collecting thrift_sasl==0.2.1
Collecting thriftpy (from thrift_sasl==0.2.1)
Collecting sasl>=0.2.1 (from thrift_sasl==0.2.1)
Using cached https://files.pythonhosted.org/packages/8e/2c/45dae93d666aea8492678499e0999269b4e55f1829b1e4de5b8204706ad9/sasl-0.2.1.tar.gz
Collecting ply<4.0,>=3.4 (from thriftpy->thrift_sasl==0.2.1)
Using cached https://files.pythonhosted.org/packages/a3/58/35da89ee790598a0700ea49b2a66594140f44dec458c07e8e3d4979137fc/ply-3.11-py2.py3-none-any.whl
Requirement already satisfied: six in /anaconda3/envs/py36/lib/python3.6/site-packages (from sasl>=0.2.1->thrift_sasl==0.2.1) (1.12.0)
Building wheels for collected packages: sasl
Running setup.py bdist_wheel for sasl ... error
Complete output from command /anaconda3/envs/py36/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/1p/xb7bs_j111x1pxh7km__3dx80000gp/T/pip-install-0j2takk9/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/1p/xb7bs_j111x1pxh7km__3dx80000gp/T/pip-wheel-1nmq5k21 --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.6
creating build/lib.macosx-10.7-x86_64-3.6/sasl
copying sasl/init.py -> build/lib.macosx-10.7-x86_64-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
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.6/sasl
copying sasl/saslwrapper.h -> build/lib.macosx-10.7-x86_64-3.6/sasl
copying sasl/saslwrapper.pyx -> build/lib.macosx-10.7-x86_64-3.6/sasl
running build_ext
building 'sasl.saslwrapper' extension
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/sasl
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/envs/py36/include -arch x86_64 -I/anaconda3/envs/py36/include -arch x86_64 -Isasl -I/anaconda3/envs/py36/include/python3.6m -c sasl/saslwrapper.cpp -o build/temp.macosx-10.7-x86_64-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
^~~~~~~~
1 warning and 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: ply, thriftpy, sasl, thrift-sasl
Running setup.py install for sasl ... error
Complete output from command /anaconda3/envs/py36/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/1p/xb7bs_j111x1pxh7km__3dx80000gp/T/pip-install-0j2takk9/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/1p/xb7bs_j111x1pxh7km__3dx80000gp/T/pip-record-1mce8tj1/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.6
creating build/lib.macosx-10.7-x86_64-3.6/sasl
copying sasl/init.py -> build/lib.macosx-10.7-x86_64-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
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.6/sasl
copying sasl/saslwrapper.h -> build/lib.macosx-10.7-x86_64-3.6/sasl
copying sasl/saslwrapper.pyx -> build/lib.macosx-10.7-x86_64-3.6/sasl
running build_ext
building 'sasl.saslwrapper' extension
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/sasl
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/envs/py36/include -arch x86_64 -I/anaconda3/envs/py36/include -arch x86_64 -Isasl -I/anaconda3/envs/py36/include/python3.6m -c sasl/saslwrapper.cpp -o build/temp.macosx-10.7-x86_64-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
^~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
Command "/anaconda3/envs/py36/bin/python -u -c "import setuptools, tokenize;file='/private/var/folders/1p/xb7bs_j111x1pxh7km__3dx80000gp/T/pip-install-0j2takk9/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/1p/xb7bs_j111x1pxh7km__3dx80000gp/T/pip-record-1mce8tj1/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/1p/xb7bs_j111x1pxh7km__3dx80000gp/T/pip-install-0j2takk9/sasl/
The text was updated successfully, but these errors were encountered: