简体   繁体   English

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

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

I'm trying to install FuzzySet in my virtualenv:我正在尝试在我的 virtualenv 中安装 FuzzySet:

(virtualenv) machine:user$ pip install FuzzySet

and I got this error:我收到了这个错误:

(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/

Can someone help me?有人可以帮助我吗? I think that is related a compiler c in my machine, and is not able to compile, but I had installed a lot of things in past without problem.我认为这与我的机器中的编译器c有关,并且无法编译,但是我过去安装了很多没有问题的东西。

phd's answer didn't fix it for me.博士的回答并没有为我解决这个问题。 Installing cython manually did the trick:手动安装 cython 可以解决问题:

pip install cython

The fuzzyset package at PyPI lacks the file fuzzyset/cfuzzyset.c . PyPI 中的Fuzzyset包缺少文件fuzzyset/cfuzzyset.c It's a bug in the package, already reported .这是包中的一个错误,已经报告了

Your only chance for now is to install from github:你现在唯一的机会是从 github 安装:

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

I couldn't get !pip install fuzzyset to work either on OS X, python 3.7.我无法在 OS X、python 3.7 上运行!pip install fuzzyset But !easy_install fuzzyset worked fine但是!easy_install fuzzyset工作正常

Installing fuzzyset after installing cython fixed the problem for me安装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