I believe this is the issue. If you look at /usr/bin/pip3, you will see the incorrect shebang line:

#!/codebuild/output/src727/src/github.com/OnionIoT/source/staging_dir/hostpkg/bin/python3.6

instead of

#!/usr/bin/python3

I think onion.io needs to fix their package. Does anyone know how to notify them?