Installation of Platform9 CLI Failed on WSL

Trying to install the Platform9 CLI on WSL (Ubuntu 20.04.1 LTS on Windows 10 x86_64 10 host machine), but I get the following error:

$ bash <(curl -sL
Validating and installing package dependencies
[sudo] password for jervan:
Python Version Selected: python3
Initializing Virtual Environment using Python 3
Upgrading pip
Installing Platform9 CLI
ASSERT: Installation of Platform9 CLI Failed

Installation failed, Here are the last 10 lines from the log
The full installation log is available at /home/jervan/pf9/log/cli_install.log
If more information is needed re-run the install with --debug
    building 'netifaces' extension
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DNETIFACES_VERSION=0.10.9 -DHAVE_GETIFADDRS=1 -DHAVE_GETNAMEINFO=1 -DHAVE_NETASH_ASH_H=1 -DHAVE_NETATALK_AT_H=1 -DHAVE_NETAX25_AX25_H=1 -DHAVE_NETECONET_EC_H=1 -DHAVE_NETIPX_IPX_H=1 -DHAVE_NETPACKET_PACKET_H=1 -DHAVE_NETROSE_ROSE_H=1 -DHAVE_LINUX_ATM_H=1 -DHAVE_LINUX_LLC_H=1 -DHAVE_LINUX_TIPC_H=1 -DHAVE_LINUX_DN_H=1 -DHAVE_SOCKADDR_AT=1 -DHAVE_SOCKADDR_AX25=1 -DHAVE_SOCKADDR_IN=1 -DHAVE_SOCKADDR_IN6=1 -DHAVE_SOCKADDR_IPX=1 -DHAVE_SOCKADDR_UN=1 -DHAVE_SOCKADDR_ROSE=1 -DHAVE_SOCKADDR_ASH=1 -DHAVE_SOCKADDR_EC=1 -DHAVE_SOCKADDR_LL=1 -DHAVE_SOCKADDR_ATMPVC=1 -DHAVE_SOCKADDR_ATMSVC=1 -DHAVE_SOCKADDR_DN=1 -DHAVE_SOCKADDR_LLC=1 -DHAVE_PF_NETLINK=1 -I/home/jervan/pf9/pf9-venv/include -I/usr/include/python3.8 -c netifaces.c -o build/temp.linux-x86_64-3.8/netifaces.o
    netifaces.c:1:10: fatal error: Python.h: No such file or directory
        1 | #include <Python.h>
          |          ^~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
ERROR: Command errored out with exit status 1: /home/jervan/pf9/pf9-venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k9kgoipl/netifaces_3a09208addd34c958bae5fb7ef8ff0d6/'"'"'; __file__='"'"'/tmp/pip-install-k9kgoipl/netifaces_3a09208addd34c958bae5fb7ef8ff0d6/'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);'"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-wjfud3mk/install-record.txt --single-version-externally-managed --compile --install-headers /home/jervan/pf9/pf9-venv/include/site/python3.8/netifaces Check the logs for full command output.
DEBUGGING: 23:35:34 : 225.790848500 :63 : ASSERT: Installation of Platform9 CLI Failed

For full log output, see:

Also crossposted to

I first needed to install header files and a static library:

sudo apt-get install python3-dev

After that the CLI installation succeeded

FYI, this error also appears on a fresh install of Ubuntu 20.04 LTS.