PlatformIO IDE installer on VScode (on mac) is stuck in a loop

I see, the problem is with your Conda. It looks it has fully overwritten PYTHONPATH. You need to clean up your system environment variables. You try to install any packages but they go “somewhere”. Please provide output of

echo $PYTHONPATH
python3 -c "import sys; print(sys.path)"

P.S: I do not recommend using Anaconda. It hacks your machine and brings ton of problems. Just use native python3 -m venv --help if you need to manage isolated packages.

I removed anaconda from my system to make things easier.
I made sure there’s no reference to anaconda in the PATH variable as well.
I then executed brew update and upgrade.

As for the output you asked about:
echo $PYTHONPATH returned an empty line

> python3 -c "import sys; print(sys.path)"
['', '/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/site-packages', '/usr/local/Cellar/matplotlib/2.2.3/libexec/lib/python3.7/site-packages']

I also tried the PlatformIO installer again with this output:

> python3 -c "$(curl -fsSL https://raw.githubusercontent.com/platformio/platformio/develop/scripts/get-platformio.py)"
Installer version: 0.1.0
Platform: Darwin-18.7.0-x86_64-i386-64bit
Python version: 3.7.7 (default, Mar 10 2020, 15:43:03)
[Clang 11.0.0 (clang-1100.0.33.17)]
Python path: /usr/local/opt/python/bin/python3.7
Creating a virtual environment at /Users/adilavy/.platformio/penv
Updating Python package manager (PIP) in a virtual environment
PIP has been successfully updated!
Virtual environment has been successfully created!
Installing PlatformIO Core
/Users/adilavy/.platformio/penv/bin/python: No module named pip
Error: Could not install PlatformIO Core: Command '['/Users/adilavy/.platformio/penv/bin/python', '-m', 'pip', 'install', '-U', 'platformio']' returned non-zero exit status 1.
Traceback (most recent call last):
  File "<string>", line 105, in <module>
  File "<string>", line 101, in main
  File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/local/opt/python/bin/python3.7', '/var/folders/yh/6tx3vn2s4zs9bk464r5ghc000000gn/T/tmpqs4f8tdy']' returned non-zero exit status 1.