helping running uber_subject.py

Hello,

I have been having issues getting uber_subject.py to work on my laptop (MacOSMojave, version 10.14.5). I would appreciate any insight on how to fix this issue. I do have to admit that I am VERY new to using AFNI and it can simply be an error on my part but I just can figure out what the error is.

When I initial run uber_subject.py I get this initial error:

PyQt4 must be installed to run the uber_subject.py GUI
→ see the output of: uber_subject.py -help_install

When running afni_system_check.py -check_all this is the output:

-------------------------------- general ---------------------------------
architecture: 64bit
system: Darwin
release: 18.6.0
version: Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64
distribution: 10.14.5 x86_64
number of CPUs: 8
apparent login shell: tcsh
shell RC file: .cshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /Users/hectorarciniega/abin/afni
afni version : Precompiled binary macos_10.12_local: Sep 13 2019
: AFNI_19.2.24 ‘Claudius’
AFNI_version.txt : AFNI_19.2.24, macos_10.12_local, Sep 13 2019
which python : /usr/local/bin/python
python version : 2.7.16
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/hectorarciniega/abin/afni)
R : 1 (/Library/Frameworks/R.framework/Versions/3.5/Resources/bin/R)
python : 2
/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7
/usr/bin/python
python2 : 1 (/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/bin/python2.7)
python3 : 1 (/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7)

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

checking for R packages…
rPkgsInstall -pkgs ALL -check : FAILURE

    oo Warning: 
       These packages are not installed on the computer: corrplot!
    These packages are not installed on the computer: metafor!

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:


Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named sip


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

-------------------------------- env vars --------------------------------
PATH = /usr/local/fsl/bin:/Applications/freesurfer/bin:/Applications/freesurfer/fsfast/bin:/Applications/freesurfer/tktools:/usr/local/fsl/bin:/Applications/freesurfer/mni/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/hectorarciniega/abin:/Applications/abin:/usr/bin:/Users/hectorarciniega/bin:/usr/local/lib

PYTHONPATH = /sw/bin/local/lib/python2.7/site-packages

R_LIBS =
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH (sub-shell) = /Applications/freesurfer/lib/gcc/lib:/opt/X11/lib/flat_namespace:/opt/X11/lib/flat_namespace
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) = /Applications/abin

------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas : found TT_N27+tlrc under /Users/hectorarciniega/abin

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

which brew : /usr/local/bin/brew
brew version : Homebrew 2.1.13

++ found PyQt4 under /usr/local/lib/python2.7/site-packages
** consider linking /usr/local/Cellar/gcc/9.2.0_1/lib/gcc/9/libgomp.1.dylib under /usr/local/lib
++ found valid link /usr/local/lib/libglib-2.0.dylib
to …/Cellar/glib/2.62.0_1/lib/libglib-2.0.dylib
++ found 1 dylib files under ‘/opt/X11/lib/flat_namespace’
– found ‘libXt’ dylib files:
/opt/X11/lib/flat_namespace/libXt.6.dylib
– recent OS X, cheating to check DYLD_LIBRARY_PATH in cur shell ‘tcsh’…
++ found evar DYLD_LIBRARY_PATH = /Applications/freesurfer/lib/gcc/lib:/opt/X11/lib/flat_namespace:/opt/X11/lib/flat_namespace

========================= summary, please fix: =========================

  • missing R packages (see rPkgsInstall)
  • check for partial install of PyQt4
  • insufficient data for AFNI bootcamp
  • consider adding /usr/local/lib/python2.7/site-packages to PYTHONPATH

Hi-

Did you try installing PyQt4? The error message that you are getting points you to the uber_subject.py help section on installing PyQt4 on different systems, as it said above:


PyQt4 must be installed to run the uber_subject.py GUI
--> see the output of: uber_subject.py -help_install

In those help instructions, it has you set PYTHONPATH to a particular location, namely ‘/usr/local/lib/python2.7/site-packages’, and from your afni_system_check.py it doesn’t look like it is set correctly (it is set to a different location, on in your /sw/ tree, which I guess means one installed with fink).

It looks like your terminal is tcsh, so if you copy+paste the following:


echo "" >> ~/.cshrc
echo "setenv PYTHONPATH /usr/local/lib/python2.7/site-packages" >> ~/.cshrc 
echo "" >> ~/.cshrc
source ~/.cshrc

… can you open uber_subject.py then?

-pt

PT,

I have installed PyQt4 using brew as mentioned in the uber_subject.py -help_install. I did this before posting here. I have also followed your instructions in adding those paths onto my .cshrc but I am still unsuccessful in opening uber_subject.py. I am open to any other recommendations.

Best,
HA

Hi HA,

I am a little confused by this, but at least your PYTHONPATH variable seems to be set to a fink tree, rather than a homebrew one.

It should probably be: /usr/local/lib/python2.7/site-packages
rather than: /sw/bin/local/lib/python2.7/site-packages

However, this will probably not matter, since the PyQt4 error is indeed coming from /usr/local.

We will try to get a homebrew machine set up and see what we find.

  • rick