簡體   English   中英

無法在 PYcharm-Conda、MacOS Catalina 上安裝“TWINT”

[英]can't install "TWINT" on PYcharm-Conda, MacOS Catalina

對不起,如果這個問題看起來很笨拙,我真的是編程新手。 我正在嘗試安裝 Twint,但無論我做什么,我仍然無法安裝。 知道我應該如何解決這些問題嗎?

 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.

嘗試安裝cchardet時出現錯誤,根據 Pypi 頁面,它不支持anaconda 盡管如此, conda-forge頻道中似乎有一個包。 因此,我建議嘗試使用安裝cchardet

conda install -c conda-forge cchardet

然后嘗試

pip install twint

再次

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM