c-pac > Running cpac: paths/dependencies?
Nov 5, 2014  08:11 PM | Naj Mahani
Running cpac: paths/dependencies?
Hi

I am hoping someone can tell me what it is I am doing wrong and how I can debug myself :)

I have tried to follow the installation instructions on the githu (http://fcp-indi.github.io/docs/user/inst...); and I run into the following problem:
1) When running cpac_gui, I get: (Yes I have installed afni)
Traceback (most recent call last):
File "/usr/local/bin/cpac_gui", line 3, in
import CPAC
File "/usr/local/lib/python2.7/dist-packages/CPAC/__init__.py", line 18, in
import anat_preproc, \
File "/usr/local/lib/python2.7/dist-packages/CPAC/anat_preproc/__init__.py", line 1, in
from anat_preproc import create_anat_preproc
File "/usr/local/lib/python2.7/dist-packages/CPAC/anat_preproc/anat_preproc.py", line 2, in
from nipype.interfaces.afni import preprocess
ImportError: No module named nipype.interfaces.afni
I suspect this has to do with incompatible paths, but I am not sure how to fix that actually.

2) I wrote a py script (cpac.py) consisting of the following commands (pointing to the right path)
import sys
sys.path.insert(0,'/custom/path/to/isolated_nipype/site-packages')
sys.path.insert(0,'/custom/path/to/isolated_CPAC/site-packages')
import nipype
import CPAC
CPAC.GUI.run()

this gets cpac_gui run; but only through sudo!!

Without sudo I got the following:

Traceback (most recent call last):
File "cpac.py", line 6, in
import CPAC
File "/opt/cpac/lib/python2.7/site-packages/CPAC/__init__.py", line 18, in
import anat_preproc, \
File "/opt/cpac/lib/python2.7/site-packages/CPAC/qc/__init__.py", line 1, in
from .utils import *
File "/opt/cpac/lib/python2.7/site-packages/CPAC/qc/utils.py", line 3, in
import matplotlib
File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 774, in
rcParams = rc_params()
File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 692, in rc_params
fname = matplotlib_fname()
File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 604, in matplotlib_fname
fname = os.path.join(get_configdir(), 'matplotlibrc')
File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 253, in wrapper
ret = func(*args, **kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 475, in _get_configdir
raise RuntimeError("'%s' is not a writable dir; you must set %s/.matplotlib to be a writable dir. You can also set environment variable MPLCONFIGDIR to any writable directory where you want matplotlib data stored "% (h, h))
RuntimeError: '/home/nmahani' is not a writable dir; you must set /home/naj/.matplotlib to be a writable dir. You can also set environment variable MPLCONFIGDIR to any writable directory where you want matplotlib data stored

Much thanks

Threaded View

TitleAuthorDate
Running cpac: paths/dependencies?
Naj Mahani Nov 5, 2014
Naj Mahani Nov 7, 2014