0
votes

I have been trying to install xlwings module (on python 3.7) from terminal and getting some errors. At the last try I have reached a point that when I type pip3 install xlwings I receive below error.

gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=550 -DPSUTIL_OSX=1 -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c psutil/_psutil_common.c -o build/temp.macosx-10.9-x86_64-3.7/psutil/_psutil_common.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

Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;file='/private/var/folders/b_/kf3zc0xx3f51rbjcj5gcd9lh0000gn/T/pip-install-qo2pickz/psutil/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/b_/kf3zc0xx3f51rbjcj5gcd9lh0000gn/T/pip-record-vpk41akr/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/b_/kf3zc0xx3f51rbjcj5gcd9lh0000gn/T/pip-install-qo2pickz/psutil/

I don't know anything about terminal but open to learn. Do you have any suggestions? Thanks in advance!

1
alternatively, you can install git bash which gives you mac/linux style terminalAmir Imani

1 Answers

0
votes

I beleive you need to download and install the xcode developer tools (you don't need the full xcode install). It should fix the problem. See this answer on a related question for more details.