SSH to the GNS3 server. Better to do this than using the VMware or Virtual-box console as you’ll want to copy and paste later on.
1 – On GNS3 server, select “Open Console”

.
.
.
.
.
2 – Download the generator using the following command.
Note 1 (The URL is case sensitive)

.
.
.
.
.
3 – Execute script
python3 CiscoIOUKeygen3f.py

.
.
.
.
.
4 – View generated iourc.txt
cat /home/gns3/iourc.txtorcat iourc

.
.
.
.
.
5 – Copy and paste license into GNS3 “Edit > Preferences > IOU on UNIX”

.
.
.
.
.
That’s it.
Enjoy.