0

This is the error I am getting when trying to install nltk.

Collecting nltk
  Using cached nltk-3.5.zip (1.4 MB)
Requirement already satisfied: click in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from nltk) (7.1.2)
Requirement already satisfied: joblib in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from nltk) (0.16.0)
Collecting regex
  Using cached regex-2020.7.14.tar.gz (690 kB)
Collecting tqdm
  Using cached tqdm-4.49.0-py2.py3-none-any.whl (69 kB)
Using legacy 'setup.py install' for nltk, since package 'wheel' is not installed.
Using legacy 'setup.py install' for regex, since package 'wheel' is not installed.
Installing collected packages: regex, tqdm, nltk
    Running setup.py install for regex ... error
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-izrsarsv/regex/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-izrsarsv/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/tmp/pip-record-cqr8q0er/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/regex
         cwd: /private/tmp/pip-install-izrsarsv/regex/
    Complete output (17 lines):
    running install
    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/regex
    copying regex_3/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/regex
    copying regex_3/regex.py -> build/lib.macosx-10.9-x86_64-3.8/regex
    copying regex_3/_regex_core.py -> build/lib.macosx-10.9-x86_64-3.8/regex
    copying regex_3/test_regex.py -> build/lib.macosx-10.9-x86_64-3.8/regex
    running build_ext
    building 'regex._regex' extension
    creating build/temp.macosx-10.9-x86_64-3.8
    creating build/temp.macosx-10.9-x86_64-3.8/regex_3
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c regex_3/_regex.c -o build/temp.macosx-10.9-x86_64-3.8/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: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-izrsarsv/regex/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-izrsarsv/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/tmp/pip-record-cqr8q0er/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/regex Check the logs for full command output.

My python & pip are up to date. Does anyone know how to successfully install this package?

  • 1
    Does this answer your question? [Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)](https://stackoverflow.com/questions/52522565/git-is-not-working-after-macos-update-xcrun-error-invalid-active-developer-pa) – D Malan Sep 23 '20 at 17:43
  • I get the error: `Can’t install the software because it is not currently available from the Software Update server.` when entering that command. – Hannah Youssef Sep 23 '20 at 17:53
  • Check lower down on that page: https://stackoverflow.com/a/53089500/3486675 – D Malan Sep 23 '20 at 17:55
  • Tried the reset command as well but still getting the same error – Hannah Youssef Sep 23 '20 at 17:59
  • 1
    Have you searched the web for this string: `error: command 'gcc' failed with exit status 1`? A variety of issues can cause this. Sometimes a simple `sudo apt install gcc` is the fix. – S3DEV Sep 23 '20 at 20:01

0 Answers0