*As of December 17th 2023, the following configurations have been verified.
Device | macOS version | GFortran version | NONMEM version |
---|---|---|---|
Macbook Pro (13-inch, M1, 2020) | Big Sur | 10.2 x86 | 7.5.1 |
Macbook Pro (13-inch, M1, 2020) | Monterey | 11.3 ARM | 7.5.1 |
Macbook Pro (14-inch, M3 Pro, 2023) | Sonoma | 11.3 x86 | 7.5.1 |
*Update: NONMEM 7.5.1 will address the installation issue on Mac with Apple silicon
*NONMEM 7.5.0 and earlier versions can not be successfully configured on macOS version Monterey or greater due to the change in command line tools. If you have a Mac running Monterey, you need to downgrade your macOS version to Big Sur or earlier versions
MacOS configuration Link to heading
- Open the terminal and enter:
xcode-select --install
NONMEM Download Link to heading
-
Install fortran compiler (gfortran)
- Run
…/NM743CD/compilers/gfortran-macosx-x86.dmg
- (Alternatively, you can download other GFortran versions here.)
- To validate installation, open the terminal and enter
gfortran -c
- Run
-
Install NONMEM
- Open the terminal and go to the root directory of NONMEM installation source and enter:
For example:
sudo /bin/bash path_to_nonmem_source/SETUP74 /your_target_path gfortran
sudo /bin/bash ./SETUP74 /opt/nm74 gfortran
- Then wait (for long)
- Open the terminal and go to the root directory of NONMEM installation source and enter:
PsN (optional) Link to heading
-
Install Perl
- Check if perl exists by running
perl -v
- If not, download it here: https://www.activestate.com/products/activeperl/downloads
- Check if perl exists by running
-
Install Perl packages.
sudo cpan Math::Random sudo cpan Moose sudo cpan MooseX::Params::Validate sudo cpan Statistics::Distributions sudo cpan Archive::Zip sudo cpan File::Copy::Recursive sudo cpan YAML::XS sudo cpan Storable
Other packages may be needed, should be figured out in the next step.
-
Install PsN
-
Open the terminal and navigate to the root directory of PsN installation source and enter
sudo perl setup.pl
-
PsN will check/ask you several things:
- Where is your perl installed? Find the answer by entering
which perl
- Where do you want PsN utilities installed?
/opt/PsN/bin/
- Where do you want PsN source code copied to?
/opt/PsN/
- Where do you want documents copied to?
/opt/PsN/
and install packages (check step 2 for how)
- Where is your perl installed? Find the answer by entering
-
Write to environment variable:
echo 'EXPORT PATH=~/PsN/bin:$PATH' >> ~/.bash_profile
or
cp /etc/paths /etc/paths_backup echo '/opt/PsN/bin' >> /etc/paths
-
Test PsN installation:
which psn
-