Failed to determine the layout of your Qt installation. (installing uber_subject.py)

Dear AFNI users,

Hi, I have a trouble opening ‘uber_subjec.py’. I followed the instruction from It seems that PyQt4 was not fully installed as the message https://afni.nimh.nih.gov/ on installation, and finally reached “Install PyQt4, via JDK and fink (optional)”.
‘Fink’ was well installed (fink –version returns ‘0.45.0’).

The problem lies on the next part. When I run 3-iii. ‘sudo fink install pyqt4-mac-py27’, I encountered the message as below.


Warning: Package index cache disabled because cannot access indexer lockfile:
Read-only file system
Scanning package description files…
Information about 322 packages read in 2 seconds.
Failed: no package found for specification ‘pyqt4-mac-py27’!


It seems that everything was well installed as the output ‘afni_system_check.py -check_all’ shows.


-------------------------------- general ---------------------------------
architecture: 64bit
system: Darwin
release: 19.3.0
version: Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64
distribution: 10.15.3 x86_64
number of CPUs: 4
apparent login shell: tcsh
shell RC file: .cshrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /Users/coglab/abin/afni
afni version : Precompiled binary macos_10.12_local: Feb 26 2020
: AFNI_20.0.18 ‘Galba’
AFNI_version.txt : AFNI_20.0.18, macos_10.12_local, Feb 26 2020
which python : /usr/bin/python
python version : 2.7.16
which R : /usr/local/bin/R
R version : R version 3.5.2 (2018-12-20) – “Eggshell Igloo”
which tcsh : /bin/tcsh

instances of various programs found in PATH:
afni : 1 (/Users/coglab/abin/afni)
R : 1 (/Library/Frameworks/R.framework/Versions/3.5/Resources/bin/R)
python : 1 (/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7)
python2 : 1 (/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7)
python3 : 2
/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6
/usr/bin/python3

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

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

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

------------------------------ python libs -------------------------------
** failed to load module PyQt4
– PyQt4 is no longer needed for an AFNI bootcamp

++ module loaded: matplotlib.pyplot
module file : /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/pyplot.pyc

– python binaries under /usr/local/bin:
/usr/local/bin/python3 (sym link to /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6)
/usr/local/bin/python3.6 (sym link to /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6)

-------------------------------- env vars --------------------------------
PATH = /sw/bin:/sw/bin:/sw/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Users/coglab/abin:/Users/coglab/abin

PYTHONPATH = /sw/lib/qt4-mac/lib/python2.7/site-packages

R_LIBS =
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH = /opt/X11/lib/flat_namespace:/opt/X11/lib/flat_namespace:/opt/X11/lib/flat_namespace:/opt/X11/lib/flat_namespace

DYLD_FALLBACK_LIBRARY_PATH = /Users/coglab/abin

------------------------------ data checks -------------------------------
data dir : found AFNI_data6 under $HOME
top history: 20 Feb 2020 [rickr]: updated FT_analysis examples
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/coglab/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.6

++ 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 /usr/bin/python
++ found 1 dylib files under ‘/opt/X11/lib/flat_namespace’
– found ‘libXt’ dylib files:
/opt/X11/lib/flat_namespace/libXt.6.dylib
++ yay, env var DYLD_LIBRARY_PATH contains /opt/X11/lib/flat_namespace

========================= nothing to fix, yay! =========================


When I type “

python -c 'from PyQt4 import QtCore, QtGui'

”, I see the message as below.


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


Here are additional outputs that might help you figure out what the problem is…


brew install pyqt

Warning: pyqt 5.14.0 is already installed and up-to-date
To reinstall 5.14.0, run brew reinstall pyqt

As I failed to install pyqt4 with fink, I tried it with python, which I failed again…
I downloaded SIP and PyQt4, and installed SIP with python. Then when I tried to install PyQt4, I received message below.


python configure.py -q /usr/local/bin/qmake --verbose

Determining the layout of your Qt installation…
/usr/local/bin/qmake -spec macx-g++ -o qtdirs.mk qtdirs.pro
make -f qtdirs.mk
g++ -c -pipe -O2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -Wall -W -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED -I/usr/local/etc/qt4/mkspecs/macx-g++ -I. -I/usr/local/Cellar/qt@4/4.8.7_5/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Cellar/qt@4/4.8.7_5/lib/QtCore.framework/Versions/4/Headers -I/usr/local/include -I. -F/usr/local/lib -o qtdirs.o qtdirs.cpp
warning: include path for stdlibc++ headers not found; pass ‘-stdlib=libc++’ on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from qtdirs.cpp:1:
In file included from /usr/local/Cellar/qt@4/4.8.7_5/lib/QtCore.framework/Versions/4/Headers/QCoreApplication:1:
In file included from /usr/local/Cellar/qt@4/4.8.7_5/lib/QtCore.framework/Versions/4/Headers/qcoreapplication.h:45:
In file included from /usr/local/include/QtCore/qobject.h:47:
In file included from /usr/local/include/QtCore/qobjectdefs.h:45:
In file included from /usr/local/include/QtCore/qnamespace.h:45:
/usr/local/include/QtCore/qglobal.h:68:10: fatal error: ‘algorithm’ file not found
#include
^~~~~~~~~~~
1 warning and 1 error generated.
make: *** [qtdirs.o] Error 1
Error: Failed to determine the layout of your Qt installation. Try again using
the --verbose flag to see more detail about the problem.

I tried everything I can, I changed system integrity protection status (disabled) and so on…

Can you help me opening uber_subject.py?

Howdy-

I think this might be a Python 2.7 / Python 3.* version mismatch, since you have multiple versions of Python on your computer.

However, I’d like to step back and doublecheck about the need for using uber_subject.py. We really don’t recommend using it anymore-- it doesn’t have all the options that afni_proc.py can use, and in general we find it muuuuch simpler/faster to start with one of the afni_proc.py examples and adjust it to your own processing needs.

Do any of the examples here–
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/programs/afni_proc.py_sphx.html#examples-options-can-be-provided-in-any-order
– particularly any of the “modern” ones-- seem like a good start for your processing?

–pt