-1

I'm trying to install python-server-language on my MacBook so I can use it with Atom's Python IDE. But when i run the command pip install python-language-server, i get all these errors:

  Using cached https://files.pythonhosted.org/packages/19/e1/7f1dbe80a08aea803d0c92dd372ebaa93d17563bf60d898d11b4e9c4c26b/python_language_server-0.31.6-py3-none-any.whl
Collecting ujson<=1.35; platform_system != "Windows"
  Using cached https://files.pythonhosted.org/packages/16/c4/79f3409bc710559015464e5f49b9879430d8f87498ecdc335899732e5377/ujson-1.35.tar.gz
Requirement already satisfied: jedi<0.16,>=0.14.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from python-language-server) (0.15.2)
Requirement already satisfied: pluggy in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from python-language-server) (0.13.1)
Collecting python-jsonrpc-server>=0.3.2
  Using cached https://files.pythonhosted.org/packages/a2/41/5145d9e28f097372970004c5151fd0879f615ec086f3dc3722daf4c87268/python_jsonrpc_server-0.3.4-py3-none-any.whl
Requirement already satisfied: parso>=0.5.2 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from jedi<0.16,>=0.14.1->python-language-server) (0.5.2)
Requirement already satisfied: importlib-metadata>=0.12; python_version < "3.8" in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pluggy->python-language-server) (1.4.0)
Requirement already satisfied: zipp>=0.5 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from importlib-metadata>=0.12; python_version < "3.8"->pluggy->python-language-server) (2.0.0)
Requirement already satisfied: more-itertools in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from zipp>=0.5->importlib-metadata>=0.12; python_version < "3.8"->pluggy->python-language-server) (8.1.0)
Building wheels for collected packages: ujson
  Building wheel for ujson (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dy/bf594h1s5cq61n5xvbp1q_4m0000gn/T/pip-install-jboupnoc/ujson/setup.py'"'"'; __file__='"'"'/private/var/folders/dy/bf594h1s5cq61n5xvbp1q_4m0000gn/T/pip-install-jboupnoc/ujson/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/dy/bf594h1s5cq61n5xvbp1q_4m0000gn/T/pip-wheel-k_54icrp --python-tag cp37
       cwd: /private/var/folders/dy/bf594h1s5cq61n5xvbp1q_4m0000gn/T/pip-install-jboupnoc/ujson/
  Complete output (12 lines):
  Warning: 'classifiers' should be a list, got type 'filter'
  running bdist_wheel
  running build
  running build_ext
  building 'ujson' extension
  creating build
  creating build/temp.macosx-10.9-x86_64-3.7
  creating build/temp.macosx-10.9-x86_64-3.7/python
  creating build/temp.macosx-10.9-x86_64-3.7/lib
  gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I./python -I./lib -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c ./python/ujson.c -o build/temp.macosx-10.9-x86_64-3.7/./python/ujson.o -D_GNU_SOURCE
  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 ujson
  Running setup.py clean for ujson
Failed to build ujson
Installing collected packages: ujson, python-jsonrpc-server, python-language-server
    Running setup.py install for ujson ... error
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dy/bf594h1s5cq61n5xvbp1q_4m0000gn/T/pip-install-jboupnoc/ujson/setup.py'"'"'; __file__='"'"'/private/var/folders/dy/bf594h1s5cq61n5xvbp1q_4m0000gn/T/pip-install-jboupnoc/ujson/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/dy/bf594h1s5cq61n5xvbp1q_4m0000gn/T/pip-record-yuso66st/install-record.txt --single-version-externally-managed --compile
         cwd: /private/var/folders/dy/bf594h1s5cq61n5xvbp1q_4m0000gn/T/pip-install-jboupnoc/ujson/
    Complete output (12 lines):
    Warning: 'classifiers' should be a list, got type 'filter'
    running install
    running build
    running build_ext
    building 'ujson' extension
    creating build
    creating build/temp.macosx-10.9-x86_64-3.7
    creating build/temp.macosx-10.9-x86_64-3.7/python
    creating build/temp.macosx-10.9-x86_64-3.7/lib
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I./python -I./lib -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c ./python/ujson.c -o build/temp.macosx-10.9-x86_64-3.7/./python/ujson.o -D_GNU_SOURCE
    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.7/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dy/bf594h1s5cq61n5xvbp1q_4m0000gn/T/pip-install-jboupnoc/ujson/setup.py'"'"'; __file__='"'"'/private/var/folders/dy/bf594h1s5cq61n5xvbp1q_4m0000gn/T/pip-install-jboupnoc/ujson/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/dy/bf594h1s5cq61n5xvbp1q_4m0000gn/T/pip-record-yuso66st/install-record.txt --single-version-externally-managed --compile Check the logs for full command output. 

Can someone please help me? Im using python 3.7 on MacOS Catalina.

  • 1
    You may find [this](https://apple.stackexchange.com/questions/254380/why-am-i-getting-an-invalid-active-developer-path-when-attempting-to-use-git-a) useful – William Miller Jan 21 '20 at 08:24
  • But im not working with xcode?? – Jonas Nastopka Jan 21 '20 at 08:28
  • You may not be, but that doesn’t mean `gcc` isn’t. And it doesn’t appear to be Xcode directly which is the issue - rather something to do with the pathing it sets up – William Miller Jan 21 '20 at 08:32
  • https://stackoverflow.com/search?q=%5Bpip%5D+xcrun%3A+error%3A+invalid+active+developer+path – phd Jan 21 '20 at 13:18

1 Answers1

0

According to https://tips.tutorialhorizon.com/2015/10/01/xcrun-error-invalid-active-developer-path-library-developer-commandline-tools-missing-xcrun/ you should run xcode-select --install

Kevin Kendzia
  • 248
  • 1
  • 12
  • I’d recommend linking to [this answer](https://apple.stackexchange.com/a/254381) on apple stack exchange instead (or to the corresponding question). The answer there is the same but there is more explanation and less ad clutter, not to mention the stack exchange answer is for Catalina not El Capitan – William Miller Jan 21 '20 at 08:37