TL;DR
- Prefix
SYSTEM_VERSION_COMPAT=1
to anypyenv
,pipx
, orpip
command you run. - You can make this easier with shell aliases.
pyenv
, pipx
, and pip
on macOS Big Sur
If you have upgraded to macOS Big Sur, you may have discovered that pyenv
, pipx
, and even pip
may throw unexpected errors. Prefixing SYSTEM_VERSION_COMPAT=1
to any of these commands fixes the problem (by having macOS return 10.16
as the OS version instead of 11.0
). Hopefully this will not be necessary in the future.
You can make this automatic by adding some shell aliases.
alias pip='SYSTEM_VERSION_COMPAT=1 pip'
alias pip3='SYSTEM_VERSION_COMPAT=1 pip3'
alias pip3.7='SYSTEM_VERSION_COMPAT=1 pip3.7'
alias pip3.8='SYSTEM_VERSION_COMPAT=1 pip3.8'
alias pip3.9='SYSTEM_VERSION_COMPAT=1 pip3.9'
alias pipx='SYSTEM_VERSION_COMPAT=1 pipx'
alias pyenv='SYSTEM_VERSION_COMPAT=1 pyenv'
References
- Jeremy R. H. Sequoia. Twitter, 2020/07/20. Finding this solved my problems with these Python tools.
- Chip Warden. My Dotfiles. My dotfile repository contains and example of how I make this work with Bash shell.
Top comments (1)
Unfortunately this did not resolve the issue :/