connectomicslab/connectomemapper3

Error when launching `cmpbidsappmanager` on Windows

sebastientourbier opened this issue · 1 comments

This has been originally reported at the following link: https://groups.google.com/g/cmtk-users/c/4L1RizsU2nw

Reported Problems

  • Version 2.40 of graphviz does exist for windows machine on conda and causes the failure of the creation of environment

  • RuntimeError: No pyface.toolkits plugin could be loaded for qt

  • git-annex for windows is not distributed on conda

Fix

  • Creation of the new conda environment file environment_win10.yml, in the root of the cloned repository of connectomemapper, with the following content:
name: py37cmp-gui

channels:
- aramislab
- anaconda
- conda-forge
- conda-forge/label/cf201901
- defaults

dependencies:
- python=3.7
- pip=20.1.1
- numpy=1.18.5
- matplotlib=3.2.2
- traits=6.0.0
- traitsui=7.0.0 # Required when PyQt5 is used (RuntimeError: TraitsUI 7 or higher is required. Got version '6.1.3')
- graphviz=2.38 # 2.40 not existing for windows
- nipype=1.5.0
- pyside2=5.9.0a1
- fslpy=3.2.1
- fsleyes=0.33.0
- indexed_gzip=1.2.*

- pip:
    - duecredit==0.8.0
    - dipy==1.1.1
    - mne==0.20.7
    - obspy==1.2.1
    - datalad[full]==0.14.0
    - datalad-container==1.1.2
    - datalad-neuroimaging==0.3.1
    - pybids==0.10.2
    - apptools==4.5.0
    - statsmodels==0.11.1
    - networkx==2.2
    - sphinx==3.1.1
    - sphinx_rtd_theme==0.5.0
    - sphinx-argparse==0.2.5
    - recommonmark==0.6.0
    - pydicom==2.0.0

Reinstall the conda environment:

  • If you already have the py37cmp-gui, you would need to remove it using the following command:
conda env remove -n py37cmp-gui
  • Install the new py37cmp-gui environment from the created environment_win10.yml file:
conda env create -f /path/to/environment_win10.yml
  • Switch the traitsui/pyface backend library from PySide2 to PyQt5. This can be done by editing the first lines of cmp/cli/cmpbidsappmanager.py from:

os.environ['ETS_TOOLKIT'] = 'qt'
# os.environ['QT_API'] = 'pyqt5'
os.environ['QT_API'] = 'pyside2'

to:

os.environ['ETS_TOOLKIT'] = 'qt'
os.environ['QT_API'] = 'pyqt5'
# os.environ['QT_API'] = 'pyside2'

After saving the changes, you can reinstall connectomemapper as follows:

cd connectomemapper3/  # root of the cloned repository of connectomemapper
conda activate py37cmp-gui # activate the environment
pip install . # install cmp in the environment

Note that if you would like to use datalad, you would need to install git-annex following the instructions on https://git-annex.branchable.com/install/Windows/.

Dear Seb

Thanks a lot! It is now working, awesome :-)

There is only one bug:
Screenshot (1)

The images are not displayed, however, when I klick on the "right spot" according to the arrangement of the website it opens everything just as it is described. I will now try to process some data.

Have a good day & thanks a lot,

Pascal