How can i install netCDF4?

I tried the script here: https://gist.github.com/perrette/cd815d03830b53e24c82?fbclid=IwAR2loEbaawG9iOUd3yq3mFUUBUTHKLUJfTdU18umq9cJDF-fIlQqQ2PxATA

Then I downloaded hdf5-1.10.5 and netcdf-4.6.1 and stored on desktop. When I opened the terminal with the directory Desktop/hdf5-1.10.5 and ran this command

./configure --prefix=/usr/local --enable-shared --enable-hl make sudo make install

I received this error :

configure: WARNING: you should use --build, --host, --target
configure: WARNING: you should use --build, --host, --target
configure: WARNING: you should use --build, --host, --target
configure: WARNING: you should use --build, --host, --target
configure: WARNING: unrecognized options: --enable-hl
configure: netCDF 4.6.1
checking build system type... Invalid configuration `make': machine `make' not recognized
configure: error: /bin/bash ./config.sub make failed

If you are trying to install netCDF4 for python, you can do so from the command line using pip install netCDF4, it automatically takes care of any other dependencies such as the C libraries. If you mean another platform, you are going to need to specify which.