Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip install FuzzySet failed on OSX - virtualenv with python3

I'm trying to install FuzzySet in my virtualenv:

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

like image 231
Andre Araujo Avatar asked Dec 04 '22 20:12

Andre Araujo


2 Answers

phd's answer didn't fix it for me. Installing cython manually did the trick:

pip install cython
like image 55
jameslol Avatar answered Dec 06 '22 11:12

jameslol


The fuzzyset package at PyPI lacks the file fuzzyset/cfuzzyset.c. It's a bug in the package, already reported.

Your only chance for now is to install from github:

pip install git+https://github.com/axiak/fuzzyset.git#egg=fuzzyset
like image 42
phd Avatar answered Dec 06 '22 10:12

phd