Installing pyqt

Hey, I am relatively new and have been getting various error messages when trying to install certain things. Usually similar to this (which is what I just got trying to install Pyqt):

Error: Permission denied @ apply2files - /usr/local/opt/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

I figured it’s about time to see if I can get some help. Does anyone know what I can do or do you need more info? Thank you.

Hi-

What is the output of:


afni_system_check.py -check_all

?

–pt

I get these error messages:

Error: pyqt@4 from cartr/qt4 is given, but old name pyqt was installed from homebrew/core.
Please try to use pyqt to refer to the formula.
To force migration use brew migrate --force pyqt.

Error: pyqt 5.13.2 is already installed
To upgrade to 5.14.0, run brew upgrade pyqt.

Trying to upgrade gives me the same error as my original message.

So, what is the output of:


afni_system_check.py -check_all

?

–pt

My summary is just:

  • login shell ‘bash’, trusting user to translate code examples from ‘tcsh’
  • shell bash: consider sourcing (non-login) .bashrc from (login) .bash_profile
  • check for partial install of PyQt4

I tried to make the output into a txt file like it says on the AFNI site but got this error:
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named sip

So, if you type:


afni_system_check.py -check_all

you can’t copy+paste the terminal text output?

If you type:


afni_system_check.py -check_all > text_file.txt

you don’t get a text file, that you can open and copy+paste from with “open -t text_file.txt”, as you appear to be on a Mac?

–pt

Oh, right. Sorry. Here it is.

-------------------------------- general ---------------------------------
architecture: 64bit
system: Darwin
release: 19.2.0
version: Darwin Kernel Version 19.2.0: Sat Nov 9 03:47:04 PST 2019; root:xnu-6153.61.1~20/RELEASE_X86_64
distribution: 10.15.2 x86_64
number of CPUs: 4
apparent login shell: bash
shell RC file: .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /Users/ian/abin/afni
afni version : Precompiled binary macos_10.12_local: Dec 27 2019
: AFNI_19.3.18 ‘Nero’
AFNI_version.txt : AFNI_19.3.18, macos_10.12_local, Dec 27 2019
which python : /usr/local/bin/python
python version : 2.7.17
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/ian/abin/afni)
R : 1 (/Library/Frameworks/R.framework/Versions/3.5/Resources/bin/R)
python : 2
/usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Versions/2.7/bin/python2.7
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
python2 : 2
/usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Versions/2.7/bin/python2.7
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
python3 : 3
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7
/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 -------------------------------
++ 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

– python binaries under /usr/local/bin:
/usr/local/bin/python (sym link to /usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Versions/2.7/bin/python2.7)
/usr/local/bin/python2 (sym link to /usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Versions/2.7/bin/python2.7)
/usr/local/bin/python3.6 (sym link to /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6)
/usr/local/bin/python2.7 (sym link to /usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Versions/2.7/bin/python2.7)

-------------------------------- env vars --------------------------------
PATH = /Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/ian/abin

PYTHONPATH =
R_LIBS =
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH (sub-shell) = :/opt/X11/lib/flat_namespace
DYLD_FALLBACK_LIBRARY_PATH (sub-shell) =

------------------------------ 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/AFNI STUFF
top history: …ay 2019 [rickr]: AFNI_pamenc updates to global_*.txt
data dir : found suma_demo under $HOME/AFNI STUFF
top history: …s_New/data/Build_tmp on Mon Mar 4 11:56:45 EST 2013
data dir : found afni_handouts under $HOME/AFNI STUFF
atlas : found TT_N27+tlrc under /Users/ian/abin

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

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

++ found PyQt4 under /usr/local/lib/python2.7/site-packages
– consider installing gcc under homebrew
++ found valid link /usr/local/lib/libglib-2.0.dylib
to …/Cellar/glib/2.62.3/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 ‘bash’…
++ found evar DYLD_LIBRARY_PATH = :/opt/X11/lib/flat_namespace
– recent OS X, cheating to check DYLD_LIBRARY_PATH in shell ‘tcsh’…
++ found evar DYLD_LIBRARY_PATH = /opt/X11/lib/flat_namespace

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

  • login shell ‘bash’, trusting user to translate code examples from ‘tcsh’
  • shell bash: consider sourcing (non-login) .bashrc from (login) .bash_profile
  • check for partial install of PyQt4

Howdy-

As noted here:
https://afni.nimh.nih.gov/afni/community/board/read.php?1,155460
PyQt4 at the moment is basically only needed to run uber_subject.py, which we don’t really recommend using anyways (for setting up an FMRI pipeline, writing an afni_proc.py command is the way to go-- probably looking at one of the maaaany helpful help examples, if necessary, as a starting point). So, I think you are probably fine, as is.

One thing that you might want to do is copy+paste this into your terminal:


echo "" >> ~/.bash_profile
echo "source ~/.bashrc" >> ~/.bash_profile
echo "" >> ~/.bash_profile

That will address this comment:


* shell bash: consider sourcing (non-login) .bashrc from (login) .bash_profile

in any future terminals.

The first comment in the “please fix” is not really anything to fix, just a comment that we write most of our scripts in tcsh.

–pt

That is very helpful, thank you!