the material is based on documentation from PsN webpage
It worked with my MacBook (M3) with macOS Sonoma 14.5
You'll need:
working NONMEM
Check for required software
# Homebrew ## Display Homebrew prefix pathbrew--prefix
brewlist--versions
## Add Homebrew binary directory to PATHexportPATH=/opt/homebrew/bin:$PATHexportHOMEBREW_PREFIX=/opt/homebrew
## Open the .zshrc file for editingnano~/.zshrc## add this in the file, save changes and exit `⌃ + O, ⌃ + X`.exportPATH="/opt/homebrew/bin:$PATH"## Apply the changes made to .zshrcsource~/.zshrc# Perl ## Install using Homebrewbrewinstallperl
## Link Perl to make it accessible system-widebrewlinkperl
## Check Perl versionperl-v
## Verify the location of Perl executablewhichperl
# Python## Check versionpython--version
python3--version
# R ## Check versionR--version
# Java## Check versionjava-version
## Install if needed # Pandoc## Install Pandoc using Homebrewbrewinstallpandoc
## Check Pandoc versionpandoc--version
System dependencies
for plotting and reporting
# Install system dependencies for plotting and reporting using Homebrewbrewinstallopenssl@1.1
brewinstallcairo
brewinstallmariadb-connector-c
# Run the setup script for PsN in PsN-Source foldersudoperlsetup.pl
# Configuration file## Find the location of psn.conf configuration file ## in my case it was in `/Library/Perl/5.34/PsN_5_3_1`sudofind/-name"psn.conf"2>/dev/null## Verify the content of PsN configuration file[nm_versions]default=/opt/NONMEM/nm751,7.5
nm751=/opt/NONMEM/nm751,7.5
nonmem_nm751=/opt/nonmem/nm751,7.5
## Display help information for PsNpsn-help
Extra
Lines of code that helped to run PsN commands
# Change ownership of Homebrew directory to the current usersudochown-R{YOURUSERNAME}/opt/homebrew
# Update Homebrew to the latest versionbrewupdate
# Upgrade all outdated Homebrew packagesbrewupgrade
# Clean up old versions of installed packagesbrewcleanup
# Reinstall GCC to ensure it's up-to-datebrewreinstallgcc
# List GCC installation detailsbrewlistgcc
# Check if the libgfortran library is presentls/opt/homebrew/opt/gcc/lib/gcc/current/libgfortran.5.dylib
# Set DYLD_LIBRARY_PATH to include the GCC library pathDYLD_LIBRARY_PATH=/opt/homebrew/opt/gcc/lib/gcc/current:$DYLD_LIBRARY_PATH# Apply the updated environment variablessource~/.zshrc