error: have PyQt4, but cannot load QtCore, QtGui

Dear afni experts

I have tried many times to launch my
Following is my output of -check_all

-------------------------------- general ---------------------------------
architecture:         64bit 
system:               Darwin
release:              18.7.0
version:              Darwin Kernel Version 18.7.0: Sun Dec  1 18:59:03 PST 2019; root:xnu-4903.278.19~1/RELEASE_X86_64
distribution:         10.14.6 x86_64
number of CPUs:       4
apparent login shell: tcsh
shell RC file:        .cshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni           : /Users/lsj/abin/afni
afni version         : Precompiled binary macos_10.12_local: Jan 17 2020 
                     : AFNI_20.0.00 'Galba'
AFNI_version.txt     : AFNI_20.0.00, macos_10.12_local, Jan 17 2020
which python         : /sw/bin/python
python version       : 2.7.17
which R              : /usr/local/bin/R
R version            : R version 3.5.3 (2019-03-11) -- "Great Truth"
which tcsh           : /bin/tcsh

instances of various programs found in PATH:
    afni    : 1   (/Users/lsj/abin/afni)
    R       : 1   (/Library/Frameworks/R.framework/Versions/3.5/Resources/bin/R)
    python  : 2 
    python2 : 0 
    python3 : 1   (/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin/python3.7)

** have python3 but not python2

testing ability to start various programs...
    afni                 : success
    suma                 : success
    3dSkullStrip         : success      : success
    3dAllineate          : success
    3dRSFC               : success
    SurfMesh             : success
    3dClustSim           : success
    3dMVM                : success

checking for R packages...
    rPkgsInstall -pkgs ALL -check : success

R RHOME : /Library/Frameworks/R.framework/Resources

checking for $HOME files...
    .afnirc                   : found
    .sumarc                   : found
    .afni/help/all_progs.COMP : found

------------------------------ python libs -------------------------------
++ module loaded: PyQt4
   module file : /usr/local/lib/python2.7/site-packages/PyQt4/__init__.pyc

** have PyQt4, but cannot load QtCore, QtGui; error is:


** failed to load module matplotlib.pyplot
-- matplotlib.pyplot is not required, but is desirable

-- python binaries under /sw/bin:
    /sw/bin/python       (sym link to /sw/bin/python2.7)

-- python binaries under /usr/local/bin:
    /usr/local/bin/python3 (sym link to /usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin/python3.7)
    /usr/local/bin/python3.7 (sym link to /usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/bin/python3.7)

-------------------------------- env vars --------------------------------
PATH = /sw/bin:/sw/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/lsj/abin

PYTHONPATH = /usr/local/lib/python2.7/site-packages

DYLD_LIBRARY_PATH (sub-shell) = /opt/X11/lib/flat_namespace

------------------------------ data checks -------------------------------
data dir : found AFNI_data6   under $HOME
           top history: ...2019 [ptaylor]: updated FT_analysis/results.QC_FT.05
data dir : found AFNI_demos   under $HOME
           top history: 22 Oct 2019 [discoraj]: added Cluster Explorer Demo
data dir : found suma_demo    under $HOME
           top history: ...s_New/data/Build_tmp on Mon Mar  4 11:56:45 EST 2013
data dir : found afni_handouts under $HOME
atlas    : found TT_N27+tlrc  under /Users/lsj/abin

------------------------------ OS specific -------------------------------
XQuartz version      : 2.7.11

which fink           : /sw/bin/fink
fink version         : Package manager version: 0.45.0
which brew           : /usr/local/bin/brew
brew version         : Homebrew 2.2.3

++ found 'brew' at /usr/local/bin/brew
++ found PyQt4 under /usr/local/lib/python2.7/site-packages
** warning: have brew? PyQt4, but non-brew python /sw/bin/python
++ found 1 dylib files under '/opt/X11/lib/flat_namespace'
   -- found 'libXt' dylib files:
-- recent OS X, cheating to check DYLD_LIBRARY_PATH in cur shell 'tcsh'...
++ found evar DYLD_LIBRARY_PATH = /opt/X11/lib/flat_namespace

=========================  summary, please fix:  =========================
*  check for partial install of PyQt4

I have already install fink 0.45.0
After I run the sudo fink install pyqt4-mac-py27
I found this error: Failed: phase installing: phonon-mac-shlibs-4.5.0-39 failed
I further try fink selfupdate, but it didn’t solve the problem

following system information:

Package manager version: 0.45.0
Distribution version: selfupdate-rsync Thu Jan 23 00:01:03 2020, 10.14.5, x86_64
Trees: local/main stable/main 11.3.1
Xcode command-line tools:
Max. Fink build jobs:  4

I also post my .cshrc file for anyone can help me to set

setenv DYLD_LIBRARY_PATH /opt/X11/lib/flat_namespace
set path = ( $path  /Users/lsj/abin  ) 

if ( -f $HOME/.afni/help/all_progs.COMP ) then
   source $HOME/.afni/help/all_progs.COMP

source /sw/bin/init.csh 
set filec
set autolist
set nobeep
alias ls ls -G
alias ll ls -lG

setenv PYTHONPATH /usr/local/lib/python2.7/site-packages

Did anyone can help me to fix this problem?
I really need to run for my data.
I would very appreciate anyone who can give me some suggestion on it.


You are not alone in PyQt4 difficulties with Python3; this is a known issue:,162948,162959#msg-162959
… but actually, at present we don’t really recommend using, as it doesn’t have the full pipeline-specification flexibility that using itself directly does.

We would typically recommend starting from one of the “ -help” examples, which can be seen here:
and there are also some examples from publications here:
(though some of those have caveats about options selected, due to restrictions imposed by a particular study).

We also have some good starting examples in the AFNI Bootcamp demo sets, for example:

and posting+asking about your in-progress command here is always welcomed!