The post suggests executing tcsh executing the following file
#! /bin/tcsh
# Script to compile psi4 (compile-psi4.sh)
# Modify the following four parameters
set srcdir = $HOME/Source/psi4 # <- location of psi4 source
set bindir = $HOME/Bin/psi4 # <- location of psi4 bin
set psi4type = Release # <- debug, release, ...
# define object and prefix dirs
set objdir = $srcdir/objdir-$psi4type
set prefix = $bindir-$psi4type
# run cmake
cd $srcdir
cmake -H. -B$objdir \
-DCMAKE_BUILD_TYPE=$psi4type \
-DCMAKE_INSTALL_PREFIX=$prefix
cd $objdir
make -j10
and then including
# this is required to compile psi4
export CPLUS_INCLUDE_PATH=$HOME/miniforge3/envs/forte/include
# export psi4 to python
export PYTHONPATH=$PYTHONPATH:$HOME/Source/psi4/objdir-Release/stage/lib
# export psi to path
path+=$HOME/Source/psi4/objdir-Release/stage/bin
in the $HOME/.zshrcfile. After doing this I can call psi4 from python, but not outside, so I guess I am missing something. The only changes I have done over the code above is to use a folder called Developer instead of Source, and substituting the last line above for
# export psi to path
export PATH=$PATH/Developer/psi4/objdir-Release/stage/bin
Any reason why psi4 command might not be recognized or active?
Hi hokru!
Thanks for answering. I’d rather not conda install psi4 because it often breaks a few things inside, for example putting the psi4conda path before any other so that when you call python outside the environment it still goes looking for it to psi4conda. Overall, I’d rather use it as a last resource, if possible.
The macOS version is the last one even if the hardware is Intel, Monterey, and the export line works in the terminal.
I’m one of the Forte developers. Thanks for your patience with this - I’ve been occupied with ACS Chicago for the last week.
I’ll be fixing an incompatibility between Forte and Psi4 over the next few days but should be able to help you with your installation problem early next week.
I never got past this point. Instead, last two days I focussed on installing forte on my user on a Linux cluster, which may be more useful than my own laptop. I am similarly struggling at this point with a different error, but since the question is about Mac I’ll not post it here
For this issue, I’ll say that the Forte install assumes that you can run psi4 from the command line. If which psi4 or your OS’s equivalent returns nothing, you’ll need to change your paths so psi4 runs.