Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Big Sur clang "invalid version" error due to MACOSX_DEPLOYMENT_TARGET

Tags:

python

macos

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.

like image 416
Felipe Avatar asked Sep 19 '20 18:09

Felipe


Video Answer


1 Answers

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 
like image 124
Håkon T. Avatar answered Sep 22 '22 15:09

Håkon T.