0

Why do I always get this error when I try to install accumulation-tree? I need this for optbinning. A similar package would also be a solution.

  ERROR: Command errored out with exit status 1:
   command: /Users/elisaderoo/opt/anaconda3/bin/python -u -c 'import sys, setuptools,     tokenize; sys.argv[0] = '"'"'/private/var/folders/yc/59hh1mg16c90lpnfsfvwcnf80000gn/T/pip-install-29thp5kc/accumulation-tree/setup.py'"'"'; __file__='"'"'/private/var/folders/yc/59hh1mg16c90lpnfsfvwcnf80000gn/T/pip-install-29thp5kc/accumulation-tree/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/yc/59hh1mg16c90lpnfsfvwcnf80000gn/T/pip-wheel-4djg7a0d
       cwd: /private/var/folders/yc/59hh1mg16c90lpnfsfvwcnf80000gn/T/pip-install-29thp5kc/accumulation-tree/
  Complete output (19 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-x86_64-3.8
  creating build/lib.macosx-10.9-x86_64-3.8/accumulation_tree
  copying accumulation_tree/treeslice.py -> build/lib.macosx-10.9-x86_64-3.8/accumulation_tree
  copying accumulation_tree/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/accumulation_tree
  copying accumulation_tree/abctree.py -> build/lib.macosx-10.9-x86_64-3.8/accumulation_tree
  running build_ext
  cythoning accumulation_tree/accumulation_tree.pyx to accumulation_tree/accumulation_tree.c
  /Users/elisaderoo/opt/anaconda3/lib/python3.8/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /private/var/folders/yc/59hh1mg16c90lpnfsfvwcnf80000gn/T/pip-install-29thp5kc/accumulation-tree/accumulation_tree/accumulation_tree.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  building 'accumulation_tree.accumulation_tree' extension
  creating build/temp.macosx-10.9-x86_64-3.8
  creating build/temp.macosx-10.9-x86_64-3.8/accumulation_tree
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/elisaderoo/opt/anaconda3/include -arch x86_64 -I/Users/elisaderoo/opt/anaconda3/include -arch x86_64 -I/Users/elisaderoo/opt/anaconda3/include/python3.8 -c accumulation_tree/accumulation_tree.c -o build/temp.macosx-10.9-x86_64-  3.8/accumulation_tree/accumulation_tree.o
  xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools),    missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  error: command 'gcc' failed with exit status 1
     ----------------------------------------
     ERROR: Failed building wheel for accumulation-tree

3 Answers3

0

This error might be due to not having Cython installed. Alternatively, you can clone the repository from GitHub, remove the dependency tdigest from the list of install_requires in setup.py, and install from the source using python setup.py install.

0

Try running (in a terminal window)

xcode-select –install

(and clicking through dialog)

If that doesn't work try:

sudo xcode-select --reset

Several links show this problem in other contexts (e.g.)

https://developer.apple.com/forums/thread/673827

Fatal Error (invalid active developer path ) After Upgrading R / R Studio

blucena
  • 291
  • 3
  • 6
0

you may not have installed gfortran

first try to install it

sudo apt install gfortran
Ehsan
  • 89
  • 9