Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

python - Big Sur clang "invalid version" error due to MACOSX_DEPLOYMENT_TARGET

I assume due to the fact Big Sur is sparkling new hotfixes for the new OS have not yet happen. When attempting to install modules that use clang for compilation, the following error is thrown:

clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.0'

Currently running:

  • Mac OS Big Sur, 11.0 Beta
  • Intel CPU (i386)
  • Python 3.8.0 installed via pyenv

Multiple modules have clang dependencies, and so it seems this error is quite common. An example:

pip install multidict

Installing older versions of Command Line Tools (e.g. 11.5) does not work as well.

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

I would like to extend @Felipe excellent answer; if it doesn't work even with running

>>> softwareupdate --all --install --force
Software Update Tool

Finding available software
No updates are available.

...following the wisdom of the "homebrew doctor" solves it, i.e. remove and reinstall:

sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...