簡體   English   中英

pip install FuzzySet 在 OSX 上失敗 - virtualenv with python3

[英]pip install FuzzySet failed on OSX - virtualenv with python3

我正在嘗試在我的 virtualenv 中安裝 FuzzySet:

(virtualenv) machine:user$ pip install FuzzySet

我收到了這個錯誤:

(virtualenv) machine:user$ pip install FuzzySet
Collecting FuzzySet
  Using cached fuzzyset-0.0.11.tar.gz
Requirement already satisfied: python-levenshtein in /Users/dedeco/Envs/Craw/lib/python3.6/site-packages (from FuzzySet)
Requirement already satisfied: texttable in /Users/dedeco/Envs/Craw/lib/python3.6/site-packages (from FuzzySet)
Requirement already satisfied: setuptools in /Users/dedeco/Envs/Craw/lib/python3.6/site-packages (from python-levenshtein->FuzzySet)
Building wheels for collected packages: FuzzySet
  Running setup.py bdist_wheel for FuzzySet ... error
  Complete output from command /Users/dedeco/Envs/Craw/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/y7/1vddc8q51zq_q_dc0gw581480000gn/T/pip-build-1e0boni3/FuzzySet/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 /var/folders/y7/1vddc8q51zq_q_dc0gw581480000gn/T/tmpbguw98h6pip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.12-x86_64-3.6
  creating build/lib.macosx-10.12-x86_64-3.6/fuzzyset
  copying fuzzyset/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/fuzzyset
  running build_ext
  building 'cfuzzyset' extension
  creating build/temp.macosx-10.12-x86_64-3.6
  creating build/temp.macosx-10.12-x86_64-3.6/fuzzyset
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -I/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c fuzzyset/cfuzzyset.c -o build/temp.macosx-10.12-x86_64-3.6/fuzzyset/cfuzzyset.o
  clang: error: no such file or directory: 'fuzzyset/cfuzzyset.c'
  clang: error: no input files
  error: command 'clang' failed with exit status 1

  ----------------------------------------
  Failed building wheel for FuzzySet
  Running setup.py clean for FuzzySet
Failed to build FuzzySet
Installing collected packages: FuzzySet
  Running setup.py install for FuzzySet ... error
    Complete output from command /Users/dedeco/Envs/Craw/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/y7/1vddc8q51zq_q_dc0gw581480000gn/T/pip-build-1e0boni3/FuzzySet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/y7/1vddc8q51zq_q_dc0gw581480000gn/T/pip-ku90bpma-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/dedeco/Envs/Craw/bin/../include/site/python3.6/FuzzySet:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.12-x86_64-3.6
    creating build/lib.macosx-10.12-x86_64-3.6/fuzzyset
    copying fuzzyset/__init__.py -> build/lib.macosx-10.12-x86_64-3.6/fuzzyset
    running build_ext
    building 'cfuzzyset' extension
    creating build/temp.macosx-10.12-x86_64-3.6
    creating build/temp.macosx-10.12-x86_64-3.6/fuzzyset
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -I/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c fuzzyset/cfuzzyset.c -o build/temp.macosx-10.12-x86_64-3.6/fuzzyset/cfuzzyset.o
    clang: error: no such file or directory: 'fuzzyset/cfuzzyset.c'
    clang: error: no input files
    error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/Users/dedeco/Envs/Craw/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/y7/1vddc8q51zq_q_dc0gw581480000gn/T/pip-build-1e0boni3/FuzzySet/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/y7/1vddc8q51zq_q_dc0gw581480000gn/T/pip-ku90bpma-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/dedeco/Envs/Craw/bin/../include/site/python3.6/FuzzySet" failed with error code 1 in /private/var/folders/y7/1vddc8q51zq_q_dc0gw581480000gn/T/pip-build-1e0boni3/FuzzySet/

有人可以幫助我嗎? 我認為這與我的機器中的編譯器c有關,並且無法編譯,但是我過去安裝了很多沒有問題的東西。

博士的回答並沒有為我解決這個問題。 手動安裝 cython 可以解決問題:

pip install cython

PyPI 中的Fuzzyset包缺少文件fuzzyset/cfuzzyset.c 這是包中的一個錯誤,已經報告了

你現在唯一的機會是從 github 安裝:

pip install git+https://github.com/axiak/fuzzyset.git#egg=fuzzyset

我無法在 OS X、python 3.7 上運行!pip install fuzzyset 但是!easy_install fuzzyset工作正常

安裝fuzzyset后安裝cython為我解決了這個問題

python -m pip install cython  
python -m pip install fuzzyset

暫無
暫無

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

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