Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
358 views
in Technique[技术] by (71.8m points)

python - Python3: error while installing google colab

I am trying to install google.colab using pip3 but I get an error as shown below:

pip3 install google.colab

I get many errors. This the last one

    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I./pandas/_libs -Ipandas/_libs/src/klib -Ipandas/_libs/src -I/usr/local/lib/python3.9/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c pandas/_libs/algos.c -o build/temp.macosx-10.11-x86_64-3.9/pandas/_libs/algos.o -Wno-unused-function
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    error: command '/usr/bin/clang' failed with exit code 1
    ----------------------------------------
  Rolling back uninstall of pandas
  Moving to /usr/local/lib/python3.9/site-packages/pandas-1.2.0.dist-info/
   from /usr/local/lib/python3.9/site-packages/~andas-1.2.0.dist-info
  Moving to /usr/local/lib/python3.9/site-packages/pandas/
   from /usr/local/lib/python3.9/site-packages/~andas
ERROR: Command errored out with exit status 1: /usr/local/opt/[email protected]/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/n2/_qs_f40s0zdgw6wn2jj0k9zw0000gn/T/pip-install-kr44vor6/pandas/setup.py'"'"'; __file__='"'"'/private/var/folders/n2/_qs_f40s0zdgw6wn2jj0k9zw0000gn/T/pip-install-kr44vor6/pandas/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/n2/_qs_f40s0zdgw6wn2jj0k9zw0000gn/T/pip-record-hp7azct5/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/pandas Check the logs for full command output.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It's not python related issue. You need to install xcode

xcode-select --install

Good luck


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...