-1

I am trying to install binance package with pip in my Jupyter notebook by writing pip install python-binance and facing this error

  ERROR: Command errored out with exit status 1:
   command: /opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kl/r9yjm40s5b160dlwk2pcfbbr0000gn/T/pip-install-s46aq8me/regex/setup.py'"'"'; __file__='"'"'/private/var/folders/kl/r9yjm40s5b160dlwk2pcfbbr0000gn/T/pip-install-s46aq8me/regex/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/kl/r9yjm40s5b160dlwk2pcfbbr0000gn/T/pip-wheel-ivmvv_y7
       cwd: /private/var/folders/kl/r9yjm40s5b160dlwk2pcfbbr0000gn/T/pip-install-s46aq8me/regex/
  Complete output (17 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/regex
  copying regex_3/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/regex
  copying regex_3/regex.py -> build/lib.macosx-10.9-x86_64-3.7/regex
  copying regex_3/_regex_core.py -> build/lib.macosx-10.9-x86_64-3.7/regex
  copying regex_3/test_regex.py -> build/lib.macosx-10.9-x86_64-3.7/regex
  running build_ext
  building 'regex._regex' extension
  creating build/temp.macosx-10.9-x86_64-3.7
  creating build/temp.macosx-10.9-x86_64-3.7/regex_3
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include/python3.7m -c regex_3/_regex.c -o build/temp.macosx-10.9-x86_64-3.7/regex_3/_regex.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 regex
  Running setup.py clean for regex
Failed to build regex
Installing collected packages: regex, dateparser, python-binance
    Running setup.py install for regex ... error
    ERROR: Command errored out with exit status 1:
     command: /opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kl/r9yjm40s5b160dlwk2pcfbbr0000gn/T/pip-install-s46aq8me/regex/setup.py'"'"'; __file__='"'"'/private/var/folders/kl/r9yjm40s5b160dlwk2pcfbbr0000gn/T/pip-install-s46aq8me/regex/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/kl/r9yjm40s5b160dlwk2pcfbbr0000gn/T/pip-record-fasv8uk1/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.7m/regex
         cwd: /private/var/folders/kl/r9yjm40s5b160dlwk2pcfbbr0000gn/T/pip-install-s46aq8me/regex/
    Complete output (17 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/regex
    copying regex_3/__init__.py -> build/lib.macosx-10.9-x86_64-3.7/regex
    copying regex_3/regex.py -> build/lib.macosx-10.9-x86_64-3.7/regex
    copying regex_3/_regex_core.py -> build/lib.macosx-10.9-x86_64-3.7/regex
    copying regex_3/test_regex.py -> build/lib.macosx-10.9-x86_64-3.7/regex
    running build_ext
    building 'regex._regex' extension
    creating build/temp.macosx-10.9-x86_64-3.7
    creating build/temp.macosx-10.9-x86_64-3.7/regex_3
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include/python3.7m -c regex_3/_regex.c -o build/temp.macosx-10.9-x86_64-3.7/regex_3/_regex.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: Command errored out with exit status 1: /opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kl/r9yjm40s5b160dlwk2pcfbbr0000gn/T/pip-install-s46aq8me/regex/setup.py'"'"'; __file__='"'"'/private/var/folders/kl/r9yjm40s5b160dlwk2pcfbbr0000gn/T/pip-install-s46aq8me/regex/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/kl/r9yjm40s5b160dlwk2pcfbbr0000gn/T/pip-record-fasv8uk1/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.7m/regex Check the logs for full command output

I have tried solutions from other stackoverflow questions, but nothing worked for me. I also have recently upgraded my macOS to Catalina 10.15.5. Thank you in advance

0xyan
  • 1
  • 1
  • https://stackoverflow.com/search?q=%5Bpip%5D+xcrun%3A+error%3A+invalid+active+developer+path+missing+xcrun – phd Jul 09 '20 at 13:01

1 Answers1

0

Here is the error crashing you pip installer :

 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

This error is caused while upgrading your macOS. This line in your console should do the trick.

xcode-select -–install

if this does not work you will need a reset :

sudo xcode-select --reset
Skander HR
  • 580
  • 3
  • 14