Installation issue with psi4 in a Mac to get Forte running

Hi! I am trying to install forte following the instructions at, using a 2018 intel MacBook pro. This post lists three main steps, and I am having trouble with the second, which features installing psi4.

The post suggests executing tcsh executing the following file

#! /bin/tcsh
# Script to compile psi4 (

# 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 \

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

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?

For Intel Macbook I recommend you install the conda version.

Do you use zshell? Older OSX still used bash.
If you use the export line on the terminal directly, does it work then?

1 Like

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.

If you can call psi4 after exporting the path in the terminal, then you maybe don’t use zshell ( .zshrc is its config file)

1 Like

I can implement the export line, but psi4 still does not work after that, sorry :frowning:

export PATH=$PATH:/Developer/psi4/objdir-Release/stage/bin not the missing :

Can you run /path/to/psi4/bin/psi4 --test ?

It seems I get 4 errors:

../psi4/objdir-Release/stage/lib/psi4/tests/ FAILED [ 53%]
../psi4/objdir-Release/stage/lib/psi4/tests/ FAILED [ 59%]
../psi4/objdir-Release/stage/lib/psi4/tests/ddd-deriv/ FAILED [ 66%]
../psi4/objdir-Release/stage/lib/psi4/tests/dfmp2-1/ FAILED [ 67%]

Otherwise, I get warnings and passes.
But the main issue is not so much that it does not work, but that when I do

Source> cd forte
Source/forte> python develop

to install forte, I get

(p4dev) usuarios-MacBook-Pro:forte pablo$ python develop
running develop
/Users/pablo_1/opt/miniconda3/envs/p4dev/lib/python3.9/site-packages/setuptools/command/ EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
/Users/pablo_1/opt/miniconda3/envs/p4dev/lib/python3.9/site-packages/setuptools/command/ SetuptoolsDeprecationWarning: install is deprecated. Use build and pip and other standards-based tools.
running egg_info
writing forte.egg-info/PKG-INFO
writing dependency_links to forte.egg-info/dependency_links.txt
writing top-level names to forte.egg-info/top_level.txt
reading manifest file 'forte.egg-info/SOURCES.txt'
adding license file 'COPYING'
adding license file 'COPYING.LESSER'
adding license file 'AUTHORS'
writing manifest file 'forte.egg-info/SOURCES.txt'
running build_ext

  Forte compilation options

    BUILD_TYPE = Release
    AMBITPATH = /Users/pablo_1/lib/ambit-Release/lib
    MAX_DET_ORB = 64
    NPROCS = 4

error: [Errno 2] No such file or directory: 'psi4'

so it is failing to find the path to psi4.

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.

1 Like

Thanks for your patience. Dealing with another issue took longer than expected. Could you update me on where things stand now?

1 Like

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 :slight_smile:

Okay, feel free to file a different report.

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.

1 Like

Thanks! With some help I have managed to get psi4 and conda installed on linux.