Unable to open/dev/gpiomem no such file or directory (version 4.1.0)

It’s always wise to do a search to see if someone else has run into the same issue you are having. For instance this thread might be informative: