So I recently installed Psi4 1.3.2 for macOS with Python 3.7 from the installer, but I’ve been having a lot of problems. Now I can’t say I installed Psi4 exactly as directed at the download site, I instead downloaded the file, then ran:
zsh Psi4conda-1.3.2-py37-MacOSX-x86_64.sh -b -p /usr/local/psi4/psi4conda
After that I ended up following the instructions at the Psi4 manual instead, and put
export PATH=/usr/local/psi4/psi4conda/bin:$PATH into my
.zprofile, and restarted the shell.
I went to run
psi4 --test, but this always gave the the output:
============================================== test session starts ============================================== platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python cachedir: .pytest_cache rootdir: /usr/local/psi4 collecting ... zsh: segmentation fault psi4 --test
Hoping to correct my mistakes, I ran the line from the download site:
echo $'. usr/local/psi4conda/etc/profile.d/conda.sh\nconda activate' >> ~/.zprofile
This cause a lot of problems initially, I think because I forgot the first
/usr, which I have since corrected, but I’ll include the output when I restarted the shell:
/Users/wane/.zprofile:.:13: no such file or directory: usr/local/psi4/psi4conda/etc/profile.d/conda.sh CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. To initialize your shell, run $ conda init <SHELL_NAME> Currently supported shells are: - bash - fish - tcsh - xonsh - zsh - powershell See 'conda init --help' for more information and options. IMPORTANT: You may need to close and restart your shell after running 'conda init'.
And so I ran
conda init zsh, which did the following:
no change /usr/local/psi4/psi4conda/condabin/conda no change /usr/local/psi4/psi4conda/bin/conda no change /usr/local/psi4/psi4conda/bin/conda-env no change /usr/local/psi4/psi4conda/bin/activate no change /usr/local/psi4/psi4conda/bin/deactivate no change /usr/local/psi4/psi4conda/etc/profile.d/conda.sh no change /usr/local/psi4/psi4conda/etc/fish/conf.d/conda.fish no change /usr/local/psi4/psi4conda/shell/condabin/Conda.psm1 no change /usr/local/psi4/psi4conda/shell/condabin/conda-hook.ps1 no change /usr/local/psi4/psi4conda/lib/python3.7/site-packages/xonsh/conda.xsh no change /usr/local/psi4/psi4conda/etc/profile.d/conda.csh modified /Users/wane/.zshrc ==> For changes to take effect, close and re-open your current shell. <==
and it put the following in
.zshrc (which had previously not existed as I prefer
# >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/usr/local/psi4/psi4conda/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/usr/local/psi4/psi4conda/etc/profile.d/conda.sh" ]; then . "/usr/local/psi4/psi4conda/etc/profile.d/conda.sh" else export PATH="/usr/local/psi4/psi4conda/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<<
This looks more or less like what I already had in my
.zprofile. After I restarted my shell, the terminal prompt has now changed:
It previously said
username@computername directory %,
but now it says
(base) username@computername directory %.
In the end
psi4 --test still gives the same error:
===================================================== test session starts ====================================================== platform darwin -- Python 3.7.3, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /usr/local/psi4/psi4conda/bin/python cachedir: .pytest_cache rootdir: /usr/local/psi4 collecting ... zsh: segmentation fault psi4 --test
Apologies that this is so long, does anyone have any idea what went wrong? Any help is appreciated, thanks.
Some extra (potentially useful?) information:
zsh -i -x -c psi4 --test, and the result was, well, long. If someone wants the full version just ask, but here are the last few lines of the output:
+(eval):1> PS1='(base) %n@%m %1~ %# ' +(eval):2> export PATH=/usr/local/psi4/psi4conda/bin:/usr/local/orca/orca:/usr/local/psi4/psi4conda/bin:/usr/local/orca/orca:/usr/local/psi4/psi4conda/bin:/usr/local/psi4/psi4conda/condabin:/usr/local/psi4/psi4conda/bin:/usr/local/orca/orca:/usr/local/psi4/psi4conda/bin:/usr/local/orca/orca:/usr/local/orca/orca:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin +(eval):3> export CONDA_SHLVL=1 +(eval):4> export CONDA_PROMPT_MODIFIER='(base) ' +__conda_activate:16> __conda_hashr +__conda_hashr:1> [ -n x ']' +__conda_hashr:2> rehash +/Users/wane/.zshrc:14> unset __conda_setup +zsh:1> psi4 Traceback (most recent call last): File "/usr/local/psi4/psi4conda/bin/psi4", line 211, in <module> raise KeyError("The file %s does not exist." % args["input"]) KeyError: 'The file input.dat does not exist.'