twintproject / twint

An advanced Twitter scraping & OSINT tool written in Python that doesn't use Twitter's API, allowing you to scrape a user's followers, following, Tweets and more while evading most API limitations.
MIT License
15.66k stars 2.72k forks source link

can't install on Macbook, Catalina OS, using PyCharm-anaconda #672

Closed hrf90 closed 4 years ago

hrf90 commented 4 years ago

Sorry if the question looks noobish, I'm really new to programming. I'm trying to install Twint and no matter what I do, I still can't. any idea how should I solve the problems? I tried to install "cchardet" and the same gcc error pops up.

`Building wheels for collected packages: cchardet Building wheel for cchardet (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/hrf/.conda/envs/untitled1/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c3/6hjdktd16z51lwy62051hkqr0000gn/T/pip-install-oittkttr/cchardet/setup.py'"'"'; file='"'"'/private/var/folders/c3/6hjdktd16z51lwy62051hkqr0000gn/T/pip-install-oittkttr/cchardet/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/c3/6hjdktd16z51lwy62051hkqr0000gn/T/pip-wheel-omcuax3g cwd: /private/var/folders/c3/6hjdktd16z51lwy62051hkqr0000gn/T/pip-install-oittkttr/cchardet/ Complete output (28 lines): running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.7 creating build/lib.macosx-10.9-x86_64-3.7/cchardet copying src/cchardet/version.py -> build/lib.macosx-10.9-x86_64-3.7/cchardet copying src/cchardet/init.py -> build/lib.macosx-10.9-x86_64-3.7/cchardet running build_ext building 'cchardet._cchardet' extension creating build/temp.macosx-10.9-x86_64-3.7 creating build/temp.macosx-10.9-x86_64-3.7/src creating build/temp.macosx-10.9-x86_64-3.7/src/cchardet creating build/temp.macosx-10.9-x86_64-3.7/src/ext creating build/temp.macosx-10.9-x86_64-3.7/src/ext/uchardet creating build/temp.macosx-10.9-x86_64-3.7/src/ext/uchardet/src creating build/temp.macosx-10.9-x86_64-3.7/src/ext/uchardet/src/LangModels gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/hrf/.conda/envs/untitled1/include -arch x86_64 -I/Users/hrf/.conda/envs/untitled1/include -arch x86_64 -Isrc/ext/uchardet/src -I/Users/hrf/.conda/envs/untitled1/include/python3.7m -c src/cchardet/_cchardet.cpp -o build/temp.macosx-10.9-x86_64-3.7/src/cchardet/_cchardet.o In file included from src/cchardet/_cchardet.cpp:4: In file included from /Users/hrf/.conda/envs/untitled1/include/python3.7m/Python.h:119: In file included from /Users/hrf/.conda/envs/untitled1/include/python3.7m/traceback.h:8: In file included from /Users/hrf/.conda/envs/untitled1/include/python3.7m/pystate.h:11: In file included from /Users/hrf/.conda/envs/untitled1/include/python3.7m/pythread.h:114: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pthread.h:64:10: fatal error: 'sys/_pthread/_pthread_condattr_t.h' file not found

include <sys/_pthread/_pthread_condattr_t.h>

       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   1 error generated.   error: command 'gcc' failed with exit status 1  

---------------------------------------- ERROR: Failed building wheel for cchardet Running setup.py clean for cchardet Failed to build cchardet Installing collected packages: cchardet, twint Running setup.py install for cchardet ... error ERROR: Command errored out with exit status 1: command: /Users/hrf/.conda/envs/untitled1/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c3/6hjdktd16z51lwy62051hkqr0000gn/T/pip-install-oittkttr/cchardet/setup.py'"'"'; file='"'"'/private/var/folders/c3/6hjdktd16z51lwy62051hkqr0000gn/T/pip-install-oittkttr/cchardet/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/c3/6hjdktd16z51lwy62051hkqr0000gn/T/pip-record-2lrq6c5g/install-record.txt --single-version-externally-managed --compile --install-headers /Users/hrf/.conda/envs/untitled1/include/python3.7m/cchardet cwd: /private/var/folders/c3/6hjdktd16z51lwy62051hkqr0000gn/T/pip-install-oittkttr/cchardet/ Complete output (28 lines): running install running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.7 creating build/lib.macosx-10.9-x86_64-3.7/cchardet copying src/cchardet/version.py -> build/lib.macosx-10.9-x86_64-3.7/cchardet copying src/cchardet/init.py -> build/lib.macosx-10.9-x86_64-3.7/cchardet running build_ext building 'cchardet._cchardet' extension creating build/temp.macosx-10.9-x86_64-3.7 creating build/temp.macosx-10.9-x86_64-3.7/src creating build/temp.macosx-10.9-x86_64-3.7/src/cchardet creating build/temp.macosx-10.9-x86_64-3.7/src/ext creating build/temp.macosx-10.9-x86_64-3.7/src/ext/uchardet creating build/temp.macosx-10.9-x86_64-3.7/src/ext/uchardet/src creating build/temp.macosx-10.9-x86_64-3.7/src/ext/uchardet/src/LangModels gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/hrf/.conda/envs/untitled1/include -arch x86_64 -I/Users/hrf/.conda/envs/untitled1/include -arch x86_64 -Isrc/ext/uchardet/src -I/Users/hrf/.conda/envs/untitled1/include/python3.7m -c src/cchardet/_cchardet.cpp -o build/temp.macosx-10.9-x86_64-3.7/src/cchardet/_cchardet.o In file included from src/cchardet/_cchardet.cpp:4: In file included from /Users/hrf/.conda/envs/untitled1/include/python3.7m/Python.h:119: In file included from /Users/hrf/.conda/envs/untitled1/include/python3.7m/traceback.h:8: In file included from /Users/hrf/.conda/envs/untitled1/include/python3.7m/pystate.h:11: In file included from /Users/hrf/.conda/envs/untitled1/include/python3.7m/pythread.h:114: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pthread.h:64:10: fatal error: 'sys/_pthread/_pthread_condattr_t.h' file not found

include <sys/_pthread/_pthread_condattr_t.h>

         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'gcc' failed with exit status 1
---------------------------------------- ERROR: Command errored out with exit status 1: /Users/hrf/.conda/envs/untitled1/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c3/6hjdktd16z51lwy62051hkqr0000gn/T/pip-install-oittkttr/cchardet/setup.py'"'"';

file='"'"'/private/var/folders/c3/6hjdktd16z51lwy62051hkqr0000gn/T/pip-install-oittkttr/cchardet/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/c3/6hjdktd16z51lwy62051hkqr0000gn/T/pip-record-2lrq6c5g/install-record.txt --single-version-externally-managed --compile --install-headers /Users/hrf/.conda/envs/untitled1/include/python3.7m/cchardet Check the logs for full command output.`

pielco11 commented 4 years ago

It seems to be a popular issue with Mac OS, and not directly related to Twint.