Errors setting up build environment on mac

Trying to set up a build environment on my macbook pro 2015 according to the instructions. I successfully reach this step of the process:

brew tap ardupilot/homebrew-px4

and on execute I get this output:

2015mattmacbookproW:~ mholmes$ brew tap ardupilot/homebrew-px4
==> Tapping ardupilot/px4
Cloning into ‘/usr/local/Homebrew/Library/Taps/ardupilot/homebrew-px4’…
remote: Enumerating objects: 242, done.
remote: Total 242 (delta 0), reused 0 (delta 0), pack-reused 242
Receiving objects: 100% (242/242), 305.35 KiB | 694.00 KiB/s, done.
Resolving deltas: 100% (137/137), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/ardupilot/homebrew-px4/px4-dev.rb
px4-dev: Unsupported special dependency :java
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/ardupilot/homebrew-px4/kconfig-frontends.rb
kconfig-frontends: Calling sha256 "digest" => :tag in a bottle block is disabled! Use brew style --fix on the formula to update the style or use sha256 tag: "digest" instead.
Please report this issue to the ardupilot/px4 tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
/usr/local/Homebrew/Library/Taps/ardupilot/homebrew-px4/kconfig-frontends.rb:18

Error: Invalid formula: /usr/local/Homebrew/Library/Taps/ardupilot/homebrew-px4/px4-sim.rb
px4-sim: Unsupported special dependency :x11
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/ardupilot/homebrew-px4/fastrtps.rb
fastrtps: Unsupported special dependency :java
Error: Cannot tap ardupilot/px4: invalid syntax in tap!

the first error is an “invalid formula” due to “unsupported special dependency :java”

can anyone advise?
thanks

1 Like

I also have this issue.

I don’t use mac but I’ve pinged some other developers to see if they can help.

There is a PR that has the fixes for this:

@CBwintertime, @brysonwu,

The PR linked by Jaimed above has been replaced by a new one here: https://github.com/ArduPilot/ardupilot/pull/17860

Do you think you could try out the modified script? You’d need to download the branch and then run the script on your mac. If that’s too difficult tell me and we should get it merged to latest in the next week or so I hope.

Thanks for the link! I’ll give it a shot and let you know

@rmackay9, @jmachuca

Thank you for the help, I got all the prereqs installed.

There were some hiccups in the script, though it could just be the way my mac’s setup:

  • When answering yes to pyenv, the script exits after installing pyenv
  • Pip commands kept returning the error below. This was resolved by running ‘pip install typing’ and setting up an alias pip=‘pip3’

pip error:

+ pip install --upgrade pip
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 11, in <module>
    load_entry_point('pip==21.1.2', 'console_scripts', 'pip')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2434, in load
    return self.resolve()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2440, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Library/Python/2.7/site-packages/pip-21.1.2-py2.7.egg/pip/__init__.py", line 1, in <module>
    from typing import List, Optional
ImportError: No module named typing

I ran the script from @bugobliterator from PR#17860 and had a mostly similar experience to @brysonwu

  • I answered yes to pyenv and it continued onward fine
  • I received the same error ‘No module named typing’. I ran alias pip='pip3' and then pip install typing (just aping @brysonwu, not because I know what I’m doing) and it seemed to install the typing module (with a warning about pip version not being the latest).
  • I then re-ran the script again in it’s entirety and it completed successfully without errors.

I just finished that and haven’t tried moving forward with getting the rest of the the build environment set up, but I wanted to report the results from my script run. Thanks for the hard work guys

I spoke too soon, the script did not complete successfully after I re-ran it; it failed at they python step. Below is an excerpt from the last portion of the output from re-running the script (after running the pip install typing command):

Installing Python-3.9.4...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
ERROR: invalid Python executable: /Users/mholmes/.pyenv/versions/3.9.4/bin/python3.9

The python-build could not find proper executable of Python after successful build.
Please open an issue for future improvements.
https://github.com/pyenv/pyenv/issues

BUILD FAILED (OS X 11.4 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/gc/z_j7v_gn4fv8mtqyvhh35rzm0000gn/T/python-build.20210627100455.44241
Results logged to /var/folders/gc/z_j7v_gn4fv8mtqyvhh35rzm0000gn/T/python-build.20210627100455.44241.log

Last 10 log lines:
		case upgrade in \
			upgrade) ensurepip="--upgrade" ;; \
			install|*) ensurepip="" ;; \
		esac; \
		DYLD_FRAMEWORK_PATH=/var/folders/gc/z_j7v_gn4fv8mtqyvhh35rzm0000gn/T/python-build.20210627100455.44241/Python-3.9.4 ./python.exe -E -m ensurepip \
			$ensurepip --root=/ ; \
	fi
Looking in links: /var/folders/gc/z_j7v_gn4fv8mtqyvhh35rzm0000gn/T/tmpzzzd_mg3
Requirement already up-to-date: setuptools in /Users/mholmes/.pyenv/versions/3.9.4/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (49.2.1)
Requirement already up-to-date: pip in /Users/mholmes/.pyenv/versions/3.9.4/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (20.2.3)

Any suggestions on how to proceed from here?
thanks

Thanks for the feedback. fYI @bugobliterator.

Hi @brysonwu @CBwintertime seems like pyenv installation is failing for you. Can you share the full log pyenv failed with. The additional step you mentioned should not be required if pyenv install succeeded.

@CBwintertime please remove alias, remove rm -rf ~/.pyenv and start the process again share the full log of pyenv installation, if failed.

forgot to mention, also clear lines added in ~/.bash_profile and ~/.zshrc . Not absolutely necessary, just cleaner.

I have fixed an issue with detection of SHELL type , please verify. I have forced pushed the code, so to fetch do git fetch git checkout pr-install-prereq-macos git reset --hard <remote>/pr-install-prereq-macos

Tried it again, it failed at the “typing” module again.

this is the script I ran (just including it to make sure that I’m running the right one):

#!/bin/bash
echo "---------- $0 start ----------"
set -e
set -x

if [ $EUID == 0 ]; then
    echo "Please do not run this script as root; don't sudo it!"
    exit 1
fi

if [[ $(ps -o comm= $$) == *"zsh"* ]]; then
    AP_COMPLETION_SCR="completion.zsh"
    SHELL_LOGIN=".zshrc"
elif [[ $(ps -o comm= $$) == *"bash"* ]]; then
    AP_COMPLETION_SCR="completion.bash"
    SHELL_LOGIN=".bash_profile"
else
    echo "Unsupported shell"
    exit 1
fi

OPT="/opt"
# Ardupilot Tools
ARDUPILOT_TOOLS="Tools/autotest"

ASSUME_YES=false
sep="##############################################"

OPTIND=1  # Reset in case getopts has been used previously in the shell.
while getopts "y" opt; do
    case "$opt" in
        \?)
            exit 1
            ;;
        y)  ASSUME_YES=true
            ;;
    esac
done


echo "Checking homebrew..."
$(which -s brew) ||
{
    echo "installing homebrew..."
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
} 
echo "Homebrew installed"

#install command line tools
echo "Checking CLI Tools installed..."
{
    ERROR=$(xcode-select --install 2>&1 > /dev/null)
} ||
{
if [[ $ERROR != *"command line tools are already installed"* ]]; then
    echo "$ERROR" 1>&2
    exit 1
fi
}

# ArduPilot official Toolchain for STM32 boards
function install_arm_none_eabi_toolchain() {
    # GNU Tools for ARM Embedded Processors
    # (see https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads)
    ARM_ROOT="gcc-arm-none-eabi-6-2017-q2-update"
    ARM_TARBALL="$ARM_ROOT-mac.tar.bz2"
    ARM_TARBALL_URL="https://firmware.ardupilot.org/Tools/STM32-tools/$ARM_TARBALL"
    if [ ! -d $OPT/$ARM_ROOT ]; then
        (
            cd $OPT;
            echo "Installing toolchain for STM32 Boards"
            echo "Downloading from ArduPilot server"
            sudo wget $ARM_TARBALL_URL
            echo "Installing..."
            sudo tar xjf ${ARM_TARBALL}
            echo "... Cleaning"
            sudo rm ${ARM_TARBALL};
        )
    fi
    echo "Registering STM32 Toolchain for ccache"
    sudo ln -s -f $CCACHE_PATH /usr/local/opt/ccache/libexec/arm-none-eabi-g++
    sudo ln -s -f $CCACHE_PATH /usr/local/opt/ccache/libexec/arm-none-eabi-gcc
    echo "Done!"
}

function maybe_prompt_user() {
    if $ASSUME_YES; then
        return 0
    else
        read -p "$1"
        if [[ $REPLY =~ ^[Yy]$ ]]; then
            return 0
        else
            return 1
        fi
    fi
}

brew update
brew install gawk curl coreutils wget

PIP=pip
if maybe_prompt_user "Install python using pyenv [N/y]?" ; then
    echo "Checking pyenv..."
    {
        $(which -s pyenv)
    } ||
    {
        echo "Installing pyenv"
        curl https://pyenv.run | bash

        exportline="export PYENV_ROOT=\$HOME/.pyenv"
        echo $exportline >> ~/$SHELL_LOGIN
        exportline="export PATH=\$PYENV_ROOT/bin:\$PATH"
        echo $exportline >> ~/$SHELL_LOGIN
        evalline="eval \"\$(pyenv init --path)\""
        echo $evalline >> ~/$SHELL_LOGIN
        evalline="eval \"\$(pyenv init -)\""
        echo $evalline >> ~/$SHELL_LOGIN
        source ~/$SHELL_LOGIN
    }
    echo "pyenv installed"
    env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.9.4
    pyenv global 3.9.4
fi


if [[ -z "${DO_AP_STM_ENV}" ]] && maybe_prompt_user "Install ArduPilot STM32 toolchain [N/y]?" ; then
    DO_AP_STM_ENV=1
fi

echo "Checking ccache..."
{
    $(which -s ccache)
} ||
{
    brew install ccache
    exportline="export PATH=/usr/local/opt/ccache/libexec:\$PATH";
    eval $exportline
}
CCACHE_PATH=$(which ccache)

if [[ $DO_AP_STM_ENV -eq 1 ]]; then
    install_arm_none_eabi_toolchain
fi

PYTHON_PKGS="future lxml pymavlink MAVProxy pexpect flake8"
# add some Python packages required for commonly-used MAVProxy modules and hex file generation:
if [[ $SKIP_AP_EXT_ENV -ne 1 ]]; then
    PYTHON_PKGS="$PYTHON_PKGS intelhex gnureadline"
fi
# add some packages required for commonly-used MAVProxy modules:
if [[ $SKIP_AP_GRAPHIC_ENV -ne 1 ]]; then
    PYTHON_PKGS="$PYTHON_PKGS wxPython billiard"
fi

$PIP install --upgrade pip
$PIP install wheel
$PIP install $PYTHON_PKGS

echo "Adding ArduPilot Tools to environment"

SCRIPT_DIR=$(dirname $(grealpath ${BASH_SOURCE[0]}))
ARDUPILOT_ROOT=$(grealpath "$SCRIPT_DIR/../../")

if [[ $DO_AP_STM_ENV -eq 1 ]]; then
exportline="export PATH=$OPT/$ARM_ROOT/bin:\$PATH";
grep -Fxq "$exportline" ~/$SHELL_LOGIN 2>/dev/null || {
    if maybe_prompt_user "Add $OPT/$ARM_ROOT/bin to your PATH [N/y]?" ; then
        echo $exportline >> ~/$SHELL_LOGIN
        eval $exportline
    else
        echo "Skipping adding $OPT/$ARM_ROOT/bin to PATH."
    fi
}
fi

exportline2="export PATH=$ARDUPILOT_ROOT/$ARDUPILOT_TOOLS:\$PATH";
grep -Fxq "$exportline2" ~/$SHELL_LOGIN 2>/dev/null || {
    if maybe_prompt_user "Add $ARDUPILOT_ROOT/$ARDUPILOT_TOOLS to your PATH [N/y]?" ; then
        echo $exportline2 >> ~/$SHELL_LOGIN
        eval $exportline2
    else
        echo "Skipping adding $ARDUPILOT_ROOT/$ARDUPILOT_TOOLS to PATH."
    fi
}

if [[ $SKIP_AP_COMPLETION_ENV -ne 1 ]]; then
exportline3="source $ARDUPILOT_ROOT/Tools/completion/$AP_COMPLETION_SCR";
grep -Fxq "$exportline3" ~/$SHELL_LOGIN 2>/dev/null || {
    if maybe_prompt_user "Add ArduPilot Bash Completion to your bash shell [N/y]?" ; then
        echo $exportline3 >> ~/$SHELL_LOGIN
        eval $exportline3
    else
        echo "Skipping adding ArduPilot Bash Completion."
    fi
}
fi

exportline4="export PATH=/usr/local/opt/ccache/libexec:\$PATH";
grep -Fxq "$exportline4" ~/$SHELL_LOGIN 2>/dev/null || {
    if maybe_prompt_user "Append CCache to your PATH [N/y]?" ; then
        echo $exportline4 >> ~/$SHELL_LOGIN
        eval $exportline4
    else
        echo "Skipping appending CCache to PATH."
    fi
}
echo "Done!"

git submodule update --init --recursive

echo "finished"

here is the output from my command line:

2015mattmacbookproW:Desktop mholmes$ /Users/mholmes/Documents/GitHub/prereqsscript_20210628.sh 
---------- /Users/mholmes/Documents/GitHub/prereqsscript_20210628.sh start ----------
+ '[' 501 == 0 ']'
++ ps -o comm= 89177
+ [[ /bin/bash == *\z\s\h* ]]
++ ps -o comm= 89177
+ [[ /bin/bash == *\b\a\s\h* ]]
+ AP_COMPLETION_SCR=completion.bash
+ SHELL_LOGIN=.bash_profile
+ OPT=/opt
+ ARDUPILOT_TOOLS=Tools/autotest
+ ASSUME_YES=false
+ sep='##############################################'
+ OPTIND=1
+ getopts y opt
+ echo 'Checking homebrew...'
Checking homebrew...
++ which -s brew
+ echo 'Homebrew installed'
Homebrew installed
+ echo 'Checking CLI Tools installed...'
Checking CLI Tools installed...
++ xcode-select --install
+ ERROR='xcode-select: error: command line tools are already installed, use "Software Update" to install updates'
+ [[ xcode-select: error: command line tools are already installed, use "Software Update" to install updates != *\c\o\m\m\a\n\d\ \l\i\n\e\ \t\o\o\l\s\ \a\r\e\ \a\l\r\e\a\d\y\ \i\n\s\t\a\l\l\e\d* ]]
+ brew update
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
frum
==> Updated Formulae
abcmidi            checkov            chronograf         dvc                graph-tool         jello              mermaid-cli        notmuch            payara             q                  rust-analyzer      stanford-corenlp
bear               checkstyle         cloud-nuke         erlang             hugo               k9s                netlify-cli        notmuch-mutt       polynote           rpg-cli            scummvm-tools      webpack
cbmc               chezmoi            duplicity          fish               imgproxy           languagetool       newrelic-cli       paket              protoc-gen-go      rqlite             serverless
==> Updated Casks
c0re100-qbittorrent                   google-backup-and-sync                mactracker                            spotify                               tg-pro                                zoom
duplicati                             joplin                                microsoft-azure-storage-explorer      spyder                                thunder                               zoom-for-it-admins
figma                                 kitty                                 onedrive                              syntax-highlight                      tinymediamanager
fork                                  lbry                                  portfolioperformance                  telegram-desktop                      trilium-notes
freac                                 loom                                  softorino-youtube-converter           termius                               vagrant-vmware-utility
+ brew install gawk curl coreutils wget
Warning: gawk 5.1.0 is already installed and up-to-date.
To reinstall 5.1.0, run:
  brew reinstall gawk
Warning: curl 7.77.0 is already installed and up-to-date.
To reinstall 7.77.0, run:
  brew reinstall curl
Warning: coreutils 8.32 is already installed and up-to-date.
To reinstall 8.32, run:
  brew reinstall coreutils
Warning: wget 1.21.1 is already installed and up-to-date.
To reinstall 1.21.1, run:
  brew reinstall wget
+ PIP=pip
+ maybe_prompt_user 'Install python using pyenv [N/y]?'
+ false
+ read -p 'Install python using pyenv [N/y]?'
Install python using pyenv [N/y]?y
+ [[ y =~ ^[Yy]$ ]]
+ return 0
+ echo 'Checking pyenv...'
Checking pyenv...
++ which -s pyenv
+ echo 'pyenv installed'
pyenv installed
+ env PYTHON_CONFIGURE_OPTS=--enable-framework pyenv install 3.9.4
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.4.tar.xz...
-> https://www.python.org/ftp/python/3.9.4/Python-3.9.4.tar.xz
Installing Python-3.9.4...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.9.4 to /Users/mholmes/.pyenv/versions/3.9.4

+ pyenv global 3.9.4
+ [[ -z '' ]]
+ maybe_prompt_user 'Install ArduPilot STM32 toolchain [N/y]?'
+ false
+ read -p 'Install ArduPilot STM32 toolchain [N/y]?'
Install ArduPilot STM32 toolchain [N/y]?y
+ [[ y =~ ^[Yy]$ ]]
+ return 0
+ DO_AP_STM_ENV=1
+ echo 'Checking ccache...'
Checking ccache...
++ which -s ccache
++ which ccache
+ CCACHE_PATH=/usr/local/bin/ccache
+ [[ 1 -eq 1 ]]
+ install_arm_none_eabi_toolchain
+ ARM_ROOT=gcc-arm-none-eabi-6-2017-q2-update
+ ARM_TARBALL=gcc-arm-none-eabi-6-2017-q2-update-mac.tar.bz2
+ ARM_TARBALL_URL=https://firmware.ardupilot.org/Tools/STM32-tools/gcc-arm-none-eabi-6-2017-q2-update-mac.tar.bz2
+ '[' '!' -d /opt/gcc-arm-none-eabi-6-2017-q2-update ']'
+ echo 'Registering STM32 Toolchain for ccache'
Registering STM32 Toolchain for ccache
+ sudo ln -s -f /usr/local/bin/ccache /usr/local/opt/ccache/libexec/arm-none-eabi-g++
Password:
+ sudo ln -s -f /usr/local/bin/ccache /usr/local/opt/ccache/libexec/arm-none-eabi-gcc
+ echo 'Done!'
Done!
+ PYTHON_PKGS='future lxml pymavlink MAVProxy pexpect flake8'
+ [[ '' -ne 1 ]]
+ PYTHON_PKGS='future lxml pymavlink MAVProxy pexpect flake8 intelhex gnureadline'
+ [[ '' -ne 1 ]]
+ PYTHON_PKGS='future lxml pymavlink MAVProxy pexpect flake8 intelhex gnureadline wxPython billiard'
+ pip install --upgrade pip
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 11, in <module>
    load_entry_point('pip==21.1.2', 'console_scripts', 'pip')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2434, in load
    return self.resolve()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2440, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Library/Python/2.7/site-packages/pip-21.1.2-py2.7.egg/pip/__init__.py", line 1, in <module>
    from typing import List, Optional
ImportError: No module named typing

it looks like it got past the pyenv installation successfully, and hung on the pip install --upgrade pip

I’m no expert, but I think I have multiple python versions installed, including:

$ pyenv --version
pyenv 2.0.2
$ python --version
Python 2.7.16

and the version of pip isn’t compatible with the old python. So how do I make it use the correct version of python? this multiple python version control stuff is beyond me

why does my pyenv say that I’m using 3.9.4 but then actually use version 2.0.2 pyenv and 2.7.6 python?

$ pyenv versions
      system
    * 3.9.4 (set by /Users/mholmes/.pyenv/version)
$ pyenv --version
    pyenv 2.0.2
$ python --version
    Python 2.7.16

@CBwintertime so the issue is basically after pyenv install you are still ending up with legacy installed pip being used. The pyenv is basically a way to easily install and manage various versions of python python version != pyenv version.

Also I mentioned that you need to remove your previous pyenv installation rm -rf ~/.pyenv which it seems you missed. Can you do that so pyenv can be installed and configured again.

I have forced pushed again, reverted a change, so pull accordingly.
Also can you do echo $SHELL and check that it matches the shell you are using (you can check that in your Terminal preferences)

1 Like

I had indeed removed pyenv before running the script. At least I think it is successfully being removed. I went through the process again, terminal activity shown below, including the pyenv removal and shell identification. I’m not sure what you mean by checking to make sure the echo $SHELL matches the shell I’m using. Doesn’t echo $SHELL return the shell that I’m using? My preferences are set to use /bin/bash and the terminal window title has the -bash, so all of that together makes me think I’ve got a bash shell…

The script makes it to the same place as previously.

2015mattmacbookproW:environment_install mholmes$ rm -rf ~/.pyenv
2015mattmacbookproW:environment_install mholmes$ which .pyenv
2015mattmacbookproW:environment_install mholmes$ echo $SHELL
/bin/bash
2015mattmacbookproW:environment_install mholmes$ ./prereqsscript_20210629a.sh
---------- ./prereqsscript_20210629a.sh start ----------
+ '[' 501 == 0 ']'
+ [[ /bin/bash == *\z\s\h* ]]
+ [[ /bin/bash == *\b\a\s\h* ]]
+ AP_COMPLETION_SCR=completion.bash
+ SHELL_LOGIN=.bash_profile
+ OPT=/opt
+ ARDUPILOT_TOOLS=Tools/autotest
+ ASSUME_YES=false
+ sep='##############################################'
+ OPTIND=1
+ getopts y opt
+ echo 'Checking homebrew...'
Checking homebrew...
++ which -s brew
+ echo 'Homebrew installed'
Homebrew installed
+ echo 'Checking CLI Tools installed...'
Checking CLI Tools installed...
++ xcode-select --install
+ ERROR='xcode-select: error: command line tools are already installed, use "Software Update" to install updates'
+ [[ xcode-select: error: command line tools are already installed, use "Software Update" to install updates != *\c\o\m\m\a\n\d\ \l\i\n\e\ \t\o\o\l\s\ \a\r\e\ \a\l\r\e\a\d\y\ \i\n\s\t\a\l\l\e\d* ]]
+ brew update
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
jrsonnet
==> Updated Formulae
aws-cdk                     fastlane                    glooctl                     gpg-tui                     newrelic-cli                python@3.8                  rmw                         truffle
==> New Casks
maestral                                                                   portx                                                                      touchosc
==> Updated Casks
amazon-music                                 gather                                       miniforge                                    retroarch                                    telegram-desktop
anka-build-cloud-controller-and-registry     ibackup-viewer                               netron                                       retroarch-metal                              tencent-lemon
anka-build-cloud-registry                    logseq                                       psychopy                                     sejda-pdf                                    touchosc-bridge
bisq                                         macdive                                      qlc-plus                                     skim                                         touchosc-editor
dosbox                                       meteorologist                                qutebrowser                                  standard-notes                               whatsapp
+ brew install gawk curl coreutils wget
Warning: gawk 5.1.0 is already installed and up-to-date.
To reinstall 5.1.0, run:
  brew reinstall gawk
Warning: curl 7.77.0 is already installed and up-to-date.
To reinstall 7.77.0, run:
  brew reinstall curl
Warning: coreutils 8.32 is already installed and up-to-date.
To reinstall 8.32, run:
  brew reinstall coreutils
Warning: wget 1.21.1 is already installed and up-to-date.
To reinstall 1.21.1, run:
  brew reinstall wget
+ PIP=pip
+ maybe_prompt_user 'Install python using pyenv [N/y]?'
+ false
+ read -p 'Install python using pyenv [N/y]?'
Install python using pyenv [N/y]?y
+ [[ y =~ ^[Yy]$ ]]
+ return 0
+ echo 'Checking pyenv...'
Checking pyenv...
++ which -s pyenv
+ echo 'pyenv installed'
pyenv installed
+ env PYTHON_CONFIGURE_OPTS=--enable-framework pyenv install 3.9.4
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Downloading Python-3.9.4.tar.xz...
-> https://www.python.org/ftp/python/3.9.4/Python-3.9.4.tar.xz
Installing Python-3.9.4...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.9.4 to /Users/mholmes/.pyenv/versions/3.9.4

+ pyenv global 3.9.4
+ [[ -z '' ]]
+ maybe_prompt_user 'Install ArduPilot STM32 toolchain [N/y]?'
+ false
+ read -p 'Install ArduPilot STM32 toolchain [N/y]?'
Install ArduPilot STM32 toolchain [N/y]?y
+ [[ y =~ ^[Yy]$ ]]
+ return 0
+ DO_AP_STM_ENV=1
+ echo 'Checking ccache...'
Checking ccache...
++ which -s ccache
++ which ccache
+ CCACHE_PATH=/usr/local/bin/ccache
+ [[ 1 -eq 1 ]]
+ install_arm_none_eabi_toolchain
+ ARM_ROOT=gcc-arm-none-eabi-6-2017-q2-update
+ ARM_TARBALL=gcc-arm-none-eabi-6-2017-q2-update-mac.tar.bz2
+ ARM_TARBALL_URL=https://firmware.ardupilot.org/Tools/STM32-tools/gcc-arm-none-eabi-6-2017-q2-update-mac.tar.bz2
+ '[' '!' -d /opt/gcc-arm-none-eabi-6-2017-q2-update ']'
+ echo 'Registering STM32 Toolchain for ccache'
Registering STM32 Toolchain for ccache
+ sudo ln -s -f /usr/local/bin/ccache /usr/local/opt/ccache/libexec/arm-none-eabi-g++
Password:
+ sudo ln -s -f /usr/local/bin/ccache /usr/local/opt/ccache/libexec/arm-none-eabi-gcc
+ echo 'Done!'
Done!
+ PYTHON_PKGS='future lxml pymavlink MAVProxy pexpect geocoder flake8'
+ [[ '' -ne 1 ]]
+ PYTHON_PKGS='future lxml pymavlink MAVProxy pexpect geocoder flake8 intelhex gnureadline'
+ [[ '' -ne 1 ]]
+ PYTHON_PKGS='future lxml pymavlink MAVProxy pexpect geocoder flake8 intelhex gnureadline wxPython billiard'
+ pip install --upgrade pip
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 11, in <module>
    load_entry_point('pip==21.1.2', 'console_scripts', 'pip')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2434, in load
    return self.resolve()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 2440, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Library/Python/2.7/site-packages/pip-21.1.2-py2.7.egg/pip/__init__.py", line 1, in <module>
    from typing import List, Optional
ImportError: No module named typing
2015mattmacbookproW:environment_install mholmes$

@CBwintertime can you remove ~/.pyenv , restart the terminal and then share the output of which pyenv it should be empty. Something bizarre is going on, I don’t see the installation process of pyenv in your log.