Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.condarc envs_dirs: breaks install_sct #3982

Closed
kousu opened this issue Dec 20, 2022 · 9 comments · Fixed by #3989
Closed

.condarc envs_dirs: breaks install_sct #3982

kousu opened this issue Dec 20, 2022 · 9 comments · Fixed by #3989
Assignees
Labels
installation category: install_sct or pip/setup.py user requested Raised by user on the SCT forum/email/GitHub. Be sure to notify them when fixed in a release.
Milestone

Comments

@kousu
Copy link
Contributor

kousu commented Dec 20, 2022

Description

If an env named venv_sct predates running ./install_sct, the installation will fail.

Steps to Reproduce

  1. Install miniconda from https://github.com/conda-forge/miniforge

    p115628@joplin:~$ curl -JLO https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                   Dload  Upload   Total   Spent    Left  Speed
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    100 61.8M  100 61.8M    0     0  21.6M      0  0:00:02  0:00:02 --:--:-- 24.3M
    p115628@joplin:~$ sh ./Miniforge3-Linux-x86_64.sh -b
    PREFIX=/home/GRAMES.POLYMTL.CA/p115628/miniforge3
    Unpacking payload ...
    Extracting python-3.10.6-ha86cf86_0_cpython.tar.bz2
    Extracting _libgcc_mutex-0.1-conda_forge.tar.bz2
    Extracting ca-certificates-2022.9.24-ha878542_0.tar.bz2
    Extracting ld_impl_linux-64-2.39-hc81fddc_0.tar.bz2
    Extracting tzdata-2022f-h191b570_0.tar.bz2
    Extracting libgomp-12.2.0-h65d4601_19.tar.bz2
    Extracting _openmp_mutex-4.5-2_gnu.tar.bz2
    Extracting libgcc-ng-12.2.0-h65d4601_19.tar.bz2
    Extracting bzip2-1.0.8-h7f98852_4.tar.bz2
    Extracting libffi-3.4.2-h7f98852_5.tar.bz2
    Extracting libnsl-2.0.0-h7f98852_0.tar.bz2
    Extracting libuuid-2.32.1-h7f98852_1000.tar.bz2
    Extracting libzlib-1.2.13-h166bdaf_4.tar.bz2
    Extracting ncurses-6.3-h27087fc_1.tar.bz2
    Extracting openssl-3.0.7-h166bdaf_0.tar.bz2
    Extracting xz-5.2.6-h166bdaf_0.tar.bz2
    Extracting yaml-0.2.5-h7f98852_2.tar.bz2
    Extracting libsqlite-3.40.0-h753d276_0.tar.bz2
    Extracting readline-8.1.2-h0f457ee_0.tar.bz2
    Extracting tk-8.6.12-h27826a3_0.tar.bz2
    Extracting certifi-2022.9.24-pyhd8ed1ab_0.tar.bz2
    Extracting charset-normalizer-2.1.1-pyhd8ed1ab_0.tar.bz2
    Extracting colorama-0.4.6-pyhd8ed1ab_0.tar.bz2
    Extracting idna-3.4-pyhd8ed1ab_0.tar.bz2
    Extracting pycparser-2.21-pyhd8ed1ab_0.tar.bz2
    Extracting pysocks-1.7.1-pyha2e5f31_6.tar.bz2
    Extracting python_abi-3.10-2_cp310.tar.bz2
    Extracting setuptools-65.5.1-pyhd8ed1ab_0.tar.bz2
    Extracting toolz-0.12.0-pyhd8ed1ab_0.tar.bz2
    Extracting wheel-0.38.4-pyhd8ed1ab_0.tar.bz2
    Extracting cffi-1.15.1-py310h255011f_2.tar.bz2
    Extracting pip-22.3.1-pyhd8ed1ab_0.tar.bz2
    Extracting pycosat-0.6.4-py310h5764c6d_1.tar.bz2
    Extracting ruamel_yaml-0.15.80-py310h5764c6d_1008.tar.bz2
    Extracting tqdm-4.64.1-pyhd8ed1ab_0.tar.bz2
    Extracting brotlipy-0.7.0-py310h5764c6d_1005.tar.bz2
    Extracting conda-package-handling-1.9.0-py310h5764c6d_1.tar.bz2
    Extracting cryptography-38.0.3-py310h600f1e7_0.tar.bz2
    Extracting pyopenssl-22.1.0-pyhd8ed1ab_0.tar.bz2
    Extracting urllib3-1.26.11-pyhd8ed1ab_0.tar.bz2
    Extracting requests-2.28.1-pyhd8ed1ab_1.tar.bz2
    Extracting conda-22.9.0-py310hff52083_2.tar.bz2
    
                                             __
            __  ______ ___  ____ _____ ___  / /_  ____ _
           / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
          / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
         / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
        /_/
    
    conda-forge/linux-64                                        Using cache
    conda-forge/noarch                                          Using cache
    
    Transaction
    
    Prefix: /home/GRAMES.POLYMTL.CA/p115628/miniforge3
    
    Updating specs:
    
     - python==3.10.6=ha86cf86_0_cpython
     - _libgcc_mutex==0.1=conda_forge
     - ca-certificates==2022.9.24=ha878542_0
     - ld_impl_linux-64==2.39=hc81fddc_0
     - tzdata==2022f=h191b570_0
     - libgomp==12.2.0=h65d4601_19
     - _openmp_mutex==4.5=2_gnu
     - libgcc-ng==12.2.0=h65d4601_19
     - bzip2==1.0.8=h7f98852_4
     - libffi==3.4.2=h7f98852_5
     - libnsl==2.0.0=h7f98852_0
     - libuuid==2.32.1=h7f98852_1000
     - libzlib==1.2.13=h166bdaf_4
     - ncurses==6.3=h27087fc_1
     - openssl==3.0.7=h166bdaf_0
     - xz==5.2.6=h166bdaf_0
     - yaml==0.2.5=h7f98852_2
     - libsqlite==3.40.0=h753d276_0
     - readline==8.1.2=h0f457ee_0
     - tk==8.6.12=h27826a3_0
     - certifi==2022.9.24=pyhd8ed1ab_0
     - charset-normalizer==2.1.1=pyhd8ed1ab_0
     - colorama==0.4.6=pyhd8ed1ab_0
     - idna==3.4=pyhd8ed1ab_0
     - pycparser==2.21=pyhd8ed1ab_0
     - pysocks==1.7.1=pyha2e5f31_6
     - python_abi==3.10=2_cp310
     - setuptools==65.5.1=pyhd8ed1ab_0
     - toolz==0.12.0=pyhd8ed1ab_0
     - wheel==0.38.4=pyhd8ed1ab_0
     - cffi==1.15.1=py310h255011f_2
     - pip==22.3.1=pyhd8ed1ab_0
     - pycosat==0.6.4=py310h5764c6d_1
     - ruamel_yaml==0.15.80=py310h5764c6d_1008
     - tqdm==4.64.1=pyhd8ed1ab_0
     - brotlipy==0.7.0=py310h5764c6d_1005
     - conda-package-handling==1.9.0=py310h5764c6d_1
     - cryptography==38.0.3=py310h600f1e7_0
     - pyopenssl==22.1.0=pyhd8ed1ab_0
     - urllib3==1.26.11=pyhd8ed1ab_0
     - requests==2.28.1=pyhd8ed1ab_1
     - conda==22.9.0=py310hff52083_2
    
    
    Package                     Version  Build               Channel                    Size
    ────────────────────────────────────────────────────────────────────────────────────────────
    Install:
    ────────────────────────────────────────────────────────────────────────────────────────────
    
    + _libgcc_mutex                 0.1  conda_forge         conda-forge/linux-64     Cached
    + _openmp_mutex                 4.5  2_gnu               conda-forge/linux-64     Cached
    + brotlipy                    0.7.0  py310h5764c6d_1005  conda-forge/linux-64     Cached
    + bzip2                       1.0.8  h7f98852_4          conda-forge/linux-64     Cached
    + ca-certificates         2022.9.24  ha878542_0          conda-forge/linux-64     Cached
    + certifi                 2022.9.24  pyhd8ed1ab_0        conda-forge/noarch       Cached
    + cffi                       1.15.1  py310h255011f_2     conda-forge/linux-64     Cached
    + charset-normalizer          2.1.1  pyhd8ed1ab_0        conda-forge/noarch       Cached
    + colorama                    0.4.6  pyhd8ed1ab_0        conda-forge/noarch       Cached
    + conda                      22.9.0  py310hff52083_2     conda-forge/linux-64     Cached
    + conda-package-handling      1.9.0  py310h5764c6d_1     conda-forge/linux-64     Cached
    + cryptography               38.0.3  py310h600f1e7_0     conda-forge/linux-64     Cached
    + idna                          3.4  pyhd8ed1ab_0        conda-forge/noarch       Cached
    + ld_impl_linux-64             2.39  hc81fddc_0          conda-forge/linux-64     Cached
    + libffi                      3.4.2  h7f98852_5          conda-forge/linux-64     Cached
    + libgcc-ng                  12.2.0  h65d4601_19         conda-forge/linux-64     Cached
    + libgomp                    12.2.0  h65d4601_19         conda-forge/linux-64     Cached
    + libnsl                      2.0.0  h7f98852_0          conda-forge/linux-64     Cached
    + libsqlite                  3.40.0  h753d276_0          conda-forge/linux-64     Cached
    + libuuid                    2.32.1  h7f98852_1000       conda-forge/linux-64     Cached
    + libzlib                    1.2.13  h166bdaf_4          conda-forge/linux-64     Cached
    + ncurses                       6.3  h27087fc_1          conda-forge/linux-64     Cached
    + openssl                     3.0.7  h166bdaf_0          conda-forge/linux-64     Cached
    + pip                        22.3.1  pyhd8ed1ab_0        conda-forge/noarch       Cached
    + pycosat                     0.6.4  py310h5764c6d_1     conda-forge/linux-64     Cached
    + pycparser                    2.21  pyhd8ed1ab_0        conda-forge/noarch       Cached
    + pyopenssl                  22.1.0  pyhd8ed1ab_0        conda-forge/noarch       Cached
    + pysocks                     1.7.1  pyha2e5f31_6        conda-forge/noarch       Cached
    + python                     3.10.6  ha86cf86_0_cpython  conda-forge/linux-64     Cached
    + python_abi                   3.10  2_cp310             conda-forge/linux-64     Cached
    + readline                    8.1.2  h0f457ee_0          conda-forge/linux-64     Cached
    + requests                   2.28.1  pyhd8ed1ab_1        conda-forge/noarch       Cached
    + ruamel_yaml               0.15.80  py310h5764c6d_1008  conda-forge/linux-64     Cached
    + setuptools                 65.5.1  pyhd8ed1ab_0        conda-forge/noarch       Cached
    + tk                         8.6.12  h27826a3_0          conda-forge/linux-64     Cached
    + toolz                      0.12.0  pyhd8ed1ab_0        conda-forge/noarch       Cached
    + tqdm                       4.64.1  pyhd8ed1ab_0        conda-forge/noarch       Cached
    + tzdata                      2022f  h191b570_0          conda-forge/noarch       Cached
    + urllib3                   1.26.11  pyhd8ed1ab_0        conda-forge/noarch       Cached
    + wheel                      0.38.4  pyhd8ed1ab_0        conda-forge/noarch       Cached
    + xz                          5.2.6  h166bdaf_0          conda-forge/linux-64     Cached
    + yaml                        0.2.5  h7f98852_2          conda-forge/linux-64     Cached
    
    Summary:
    
    Install: 42 packages
    
    Total download: 0 B
    
    ────────────────────────────────────────────────────────────────────────────────────────────
    
    
    Transaction starting
    Linking _libgcc_mutex-0.1-conda_forge
    Linking ca-certificates-2022.9.24-ha878542_0
    Linking ld_impl_linux-64-2.39-hc81fddc_0
    Linking libgomp-12.2.0-h65d4601_19
    Linking _openmp_mutex-4.5-2_gnu
    Linking libgcc-ng-12.2.0-h65d4601_19
    Linking yaml-0.2.5-h7f98852_2
    Linking xz-5.2.6-h166bdaf_0
    Linking openssl-3.0.7-h166bdaf_0
    Linking ncurses-6.3-h27087fc_1
    Linking libzlib-1.2.13-h166bdaf_4
    Linking libuuid-2.32.1-h7f98852_1000
    Linking libnsl-2.0.0-h7f98852_0
    Linking libffi-3.4.2-h7f98852_5
    Linking bzip2-1.0.8-h7f98852_4
    Linking readline-8.1.2-h0f457ee_0
    Linking tk-8.6.12-h27826a3_0
    Linking libsqlite-3.40.0-h753d276_0
    Linking tzdata-2022f-h191b570_0
    Linking python-3.10.6-ha86cf86_0_cpython
    Linking wheel-0.38.4-pyhd8ed1ab_0
    Linking setuptools-65.5.1-pyhd8ed1ab_0
    Linking pip-22.3.1-pyhd8ed1ab_0
    Linking toolz-0.12.0-pyhd8ed1ab_0
    Linking pysocks-1.7.1-pyha2e5f31_6
    Linking pycparser-2.21-pyhd8ed1ab_0
    Linking idna-3.4-pyhd8ed1ab_0
    Linking colorama-0.4.6-pyhd8ed1ab_0
    Linking charset-normalizer-2.1.1-pyhd8ed1ab_0
    Linking certifi-2022.9.24-pyhd8ed1ab_0
    Linking tqdm-4.64.1-pyhd8ed1ab_0
    Linking python_abi-3.10-2_cp310
    Linking conda-package-handling-1.9.0-py310h5764c6d_1
    Linking ruamel_yaml-0.15.80-py310h5764c6d_1008
    Linking pycosat-0.6.4-py310h5764c6d_1
    Linking cffi-1.15.1-py310h255011f_2
    Linking cryptography-38.0.3-py310h600f1e7_0
    Linking brotlipy-0.7.0-py310h5764c6d_1005
    Linking pyopenssl-22.1.0-pyhd8ed1ab_0
    Linking urllib3-1.26.11-pyhd8ed1ab_0
    Linking requests-2.28.1-pyhd8ed1ab_1
    Linking conda-22.9.0-py310hff52083_2
    Transaction finished
    installation finished.
  2. Set up this condarc

    p115628@joplin:~/spinalcordtoolbox$ cat ~/.condarc 
    envs_dirs:
      - ~/miniforge3/envs/
    
  3. Download and run install_sct.

Expected behavior: SCT installs and works.

We're using conda, in fact installing an entirely separate copy of conda regardless of whether the user has it on their system already, because we are very concerned about controlling exactly what is in the environment and where.

Actual behavior:

Install fails at

./install_sct: ligne 605: spinalcordtoolbox/python/envs/venv_sct/pyvenv.cfg: Aucun fichier ou dossier de ce type

p115628@joplin:~/spinalcordtoolbox$ ./install_sct -y
 non-interactive mode


*******************************
* Welcome to SCT installation *
*******************************



Checking OS type and version...

Linux joplin.neuro.polymtl.ca 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Checking requirements...


OK!


SCT version ......... dev
Installation type ... in-place
Operating system .... linux (unknown)
Shell config ........ /home/GRAMES.POLYMTL.CA/p115628/.bashrc

--> Crash reports will not be sent.


SCT will be installed here: [/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox]


Skipping copy of source files (source and destination folders are the same)


Removing sct and isct softlink from /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin


rm -rf /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python


mkdir -p /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python


Downloading Miniconda...


wget -nv -O /tmp/tmp.7eisickG8Y/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

2022-12-19 19:22:58 URL:https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh [76607678/76607678] -> "/tmp/tmp.7eisickG8Y/miniconda.sh" [1]

Installing Miniconda...


bash /tmp/tmp.7eisickG8Y/miniconda.sh -p /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python -b -f

PREFIX=/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python
Unpacking payload ...
Collecting package metadata (current_repodata.json): ...working... done                                       
Solving environment: ...working... done

## Package Plan ##

  environment location: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python

  added / updated specs:
    - _libgcc_mutex==0.1=main
    - _openmp_mutex==4.5=1_gnu
    - brotlipy==0.7.0=py39h27cfd23_1003
    - ca-certificates==2022.3.29=h06a4308_1
    - certifi==2021.10.8=py39h06a4308_2
    - cffi==1.15.0=py39hd667e15_1
    - charset-normalizer==2.0.4=pyhd3eb1b0_0
    - colorama==0.4.4=pyhd3eb1b0_0
    - conda-content-trust==0.1.1=pyhd3eb1b0_0
    - conda-package-handling==1.8.1=py39h7f8727e_0
    - conda==4.12.0=py39h06a4308_0
    - cryptography==36.0.0=py39h9ce1e76_0
    - idna==3.3=pyhd3eb1b0_0
    - ld_impl_linux-64==2.35.1=h7274673_9
    - libffi==3.3=he6710b0_2
    - libgcc-ng==9.3.0=h5101ec6_17
    - libgomp==9.3.0=h5101ec6_17
    - libstdcxx-ng==9.3.0=hd4cf53a_17
    - ncurses==6.3=h7f8727e_2
    - openssl==1.1.1n=h7f8727e_0
    - pip==21.2.4=py39h06a4308_0
    - pycosat==0.6.3=py39h27cfd23_0
    - pycparser==2.21=pyhd3eb1b0_0
    - pyopenssl==22.0.0=pyhd3eb1b0_0
    - pysocks==1.7.1=py39h06a4308_0
    - python==3.9.12=h12debd9_0
    - readline==8.1.2=h7f8727e_1
    - requests==2.27.1=pyhd3eb1b0_0
    - ruamel_yaml==0.15.100=py39h27cfd23_0
    - setuptools==61.2.0=py39h06a4308_0
    - six==1.16.0=pyhd3eb1b0_1
    - sqlite==3.38.2=hc218d9a_0
    - tk==8.6.11=h1ccaba5_0
    - tqdm==4.63.0=pyhd3eb1b0_0
    - tzdata==2022a=hda174b7_0
    - urllib3==1.26.8=pyhd3eb1b0_0
    - wheel==0.37.1=pyhd3eb1b0_0
    - xz==5.2.5=h7b6447c_0
    - yaml==0.2.5=h7b6447c_0
    - zlib==1.2.12=h7f8727e_1


The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  _openmp_mutex      pkgs/main/linux-64::_openmp_mutex-4.5-1_gnu
  brotlipy           pkgs/main/linux-64::brotlipy-0.7.0-py39h27cfd23_1003
  ca-certificates    pkgs/main/linux-64::ca-certificates-2022.3.29-h06a4308_1
  certifi            pkgs/main/linux-64::certifi-2021.10.8-py39h06a4308_2
  cffi               pkgs/main/linux-64::cffi-1.15.0-py39hd667e15_1
  charset-normalizer pkgs/main/noarch::charset-normalizer-2.0.4-pyhd3eb1b0_0
  colorama           pkgs/main/noarch::colorama-0.4.4-pyhd3eb1b0_0
  conda              pkgs/main/linux-64::conda-4.12.0-py39h06a4308_0
  conda-content-tru~ pkgs/main/noarch::conda-content-trust-0.1.1-pyhd3eb1b0_0
  conda-package-han~ pkgs/main/linux-64::conda-package-handling-1.8.1-py39h7f8727e_0
  cryptography       pkgs/main/linux-64::cryptography-36.0.0-py39h9ce1e76_0
  idna               pkgs/main/noarch::idna-3.3-pyhd3eb1b0_0
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.35.1-h7274673_9
  libffi             pkgs/main/linux-64::libffi-3.3-he6710b0_2
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.3.0-h5101ec6_17
  libgomp            pkgs/main/linux-64::libgomp-9.3.0-h5101ec6_17
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.3.0-hd4cf53a_17
  ncurses            pkgs/main/linux-64::ncurses-6.3-h7f8727e_2
  openssl            pkgs/main/linux-64::openssl-1.1.1n-h7f8727e_0
  pip                pkgs/main/linux-64::pip-21.2.4-py39h06a4308_0
  pycosat            pkgs/main/linux-64::pycosat-0.6.3-py39h27cfd23_0
  pycparser          pkgs/main/noarch::pycparser-2.21-pyhd3eb1b0_0
  pyopenssl          pkgs/main/noarch::pyopenssl-22.0.0-pyhd3eb1b0_0
  pysocks            pkgs/main/linux-64::pysocks-1.7.1-py39h06a4308_0
  python             pkgs/main/linux-64::python-3.9.12-h12debd9_0
  readline           pkgs/main/linux-64::readline-8.1.2-h7f8727e_1
  requests           pkgs/main/noarch::requests-2.27.1-pyhd3eb1b0_0
  ruamel_yaml        pkgs/main/linux-64::ruamel_yaml-0.15.100-py39h27cfd23_0
  setuptools         pkgs/main/linux-64::setuptools-61.2.0-py39h06a4308_0
  six                pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_1
  sqlite             pkgs/main/linux-64::sqlite-3.38.2-hc218d9a_0
  tk                 pkgs/main/linux-64::tk-8.6.11-h1ccaba5_0
  tqdm               pkgs/main/noarch::tqdm-4.63.0-pyhd3eb1b0_0
  tzdata             pkgs/main/noarch::tzdata-2022a-hda174b7_0
  urllib3            pkgs/main/noarch::urllib3-1.26.8-pyhd3eb1b0_0
  wheel              pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
  xz                 pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
  yaml               pkgs/main/linux-64::yaml-0.2.5-h7b6447c_0
  zlib               pkgs/main/linux-64::zlib-1.2.12-h7f8727e_1


Preparing transaction: ...working... done
Executing transaction: ...working... done
installation finished.

Creating conda environment...

Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done


==> WARNING: A newer version of conda exists. <==
  current version: 4.12.0
  latest version: 22.11.1

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: /home/GRAMES.POLYMTL.CA/p115628/miniforge3/envs/venv_sct

  added / updated specs:
    - python=3.8


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _openmp_mutex-5.1          |            1_gnu          21 KB
    ca-certificates-2022.10.11 |       h06a4308_0         124 KB
    certifi-2022.9.24          |   py38h06a4308_0         154 KB
    ld_impl_linux-64-2.38      |       h1181459_1         654 KB
    libffi-3.4.2               |       h6a678d5_6         136 KB
    libgcc-ng-11.2.0           |       h1234567_1         5.3 MB
    libgomp-11.2.0             |       h1234567_1         474 KB
    libstdcxx-ng-11.2.0        |       h1234567_1         4.7 MB
    ncurses-6.3                |       h5eee18b_3         781 KB
    openssl-1.1.1s             |       h7f8727e_0         3.6 MB
    pip-22.3.1                 |   py38h06a4308_0         2.7 MB
    python-3.8.15              |       h7a1cb2a_2        20.1 MB
    readline-8.2               |       h5eee18b_0         357 KB
    setuptools-65.5.0          |   py38h06a4308_0         1.1 MB
    sqlite-3.40.0              |       h5082296_0         1.2 MB
    tk-8.6.12                  |       h1ccaba5_0         3.0 MB
    xz-5.2.8                   |       h5eee18b_0         429 KB
    zlib-1.2.13                |       h5eee18b_0         103 KB
    ------------------------------------------------------------
                                           Total:        44.9 MB

The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  _openmp_mutex      pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu
  ca-certificates    pkgs/main/linux-64::ca-certificates-2022.10.11-h06a4308_0
  certifi            pkgs/main/linux-64::certifi-2022.9.24-py38h06a4308_0
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.38-h1181459_1
  libffi             pkgs/main/linux-64::libffi-3.4.2-h6a678d5_6
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-11.2.0-h1234567_1
  libgomp            pkgs/main/linux-64::libgomp-11.2.0-h1234567_1
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-11.2.0-h1234567_1
  ncurses            pkgs/main/linux-64::ncurses-6.3-h5eee18b_3
  openssl            pkgs/main/linux-64::openssl-1.1.1s-h7f8727e_0
  pip                pkgs/main/linux-64::pip-22.3.1-py38h06a4308_0
  python             pkgs/main/linux-64::python-3.8.15-h7a1cb2a_2
  readline           pkgs/main/linux-64::readline-8.2-h5eee18b_0
  setuptools         pkgs/main/linux-64::setuptools-65.5.0-py38h06a4308_0
  sqlite             pkgs/main/linux-64::sqlite-3.40.0-h5082296_0
  tk                 pkgs/main/linux-64::tk-8.6.12-h1ccaba5_0
  wheel              pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
  xz                 pkgs/main/linux-64::xz-5.2.8-h5eee18b_0
  zlib               pkgs/main/linux-64::zlib-1.2.13-h5eee18b_0



Downloading and Extracting Packages
libgomp-11.2.0       | 474 KB    | ########## | 100% 
pip-22.3.1           | 2.7 MB    | ########## | 100% 
libstdcxx-ng-11.2.0  | 4.7 MB    | ########## | 100% 
ca-certificates-2022 | 124 KB    | ########## | 100% 
xz-5.2.8             | 429 KB    | ########## | 100% 
setuptools-65.5.0    | 1.1 MB    | ########## | 100% 
openssl-1.1.1s       | 3.6 MB    | ########## | 100% 
sqlite-3.40.0        | 1.2 MB    | ########## | 100% 
libgcc-ng-11.2.0     | 5.3 MB    | ########## | 100% 
_openmp_mutex-5.1    | 21 KB     | ########## | 100% 
python-3.8.15        | 20.1 MB   | ########## | 100% 
ld_impl_linux-64-2.3 | 654 KB    | ########## | 100% 
zlib-1.2.13          | 103 KB    | ########## | 100% 
readline-8.2         | 357 KB    | ########## | 100% 
tk-8.6.12            | 3.0 MB    | ########## | 100% 
certifi-2022.9.24    | 154 KB    | ########## | 100% 
ncurses-6.3          | 781 KB    | ########## | 100% 
libffi-3.4.2         | 136 KB    | ########## | 100% 
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
#
# To activate this environment, use
#
#     $ conda activate venv_sct
#
# To deactivate an active environment, use
#
#     $ conda deactivate

./install_sct: ligne 605: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python/envs/venv_sct/pyvenv.cfg: Aucun fichier ou dossier de ce type

Installation failed!

Please find the file "/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/install_sct_log.txt",
then upload it as a .txt attachment in a new topic on SCT's forum:
--> http://forum.spinalcordmri.org/c/sct

Discussion

This was discovered by @dpapp86. He was trying to use https://github.com/shimming-toolbox/fsleyes-plugin-shimming-toolbox/ which copied the conda installing code from SCT, and additionally had a third install of conda just so he could install fsleyes 1.5.0 (shimming-toolbox currently pins 1.4.x). So, three condas at a minimum, plus several sub-environments.

I'm not sure which of them was responsible for creating .condarc. Presumably at some point something ran conda config --append envs_dirs .... because at the time we found it he had:

% cat ~/.condarc
envs_dirs:
  - /Users/danielpapp/shimming-toolbox/python/envs/st_venv
  - /Users/danielpapp/shimming-toolbox/python/envs/st_venv/
  - /Users/danielpapp/shimming-toolbox/python/envs/
% cat ~/.conda/environments.txt 
/Users/danielpapp/miniconda/
/Users/danielpapp/miniconda/envs/dcm2bids
/Users/danielpapp/spinalcordtoolbox/python
/Users/danielpapp/shimming-toolbox/python/envs/st_venv/venv_sct
/Users/danielpapp/shimming-toolbox/python/envs/st_venv/

conda doesn't really live up to its promise as an isolation tool!

I recall (link somewhere?) that we discovered that creating or loading conda envs while already nested inside a conda env could be glitchy in incredibly difficult ways.

Here, I've discovered more ways this can fail: conda uses global ~/.condarc and ~/.conda/environments.txt, no matter which particular conda you're calling from.

But we are using it expecting that by installing to ~/spinalcordtoolbox/python/ then everything will be contained in that one folder. I assume we got the idea from the full FSL package which also does this, and now shimming-toolbox has copied the habit, adding to the complication.

@kousu kousu added the installation category: install_sct or pip/setup.py label Dec 20, 2022
@kousu
Copy link
Contributor Author

kousu commented Dec 20, 2022

Fix

I think we should be able to paper over this by replacing

python/bin/conda create -y -n venv_sct python=3.8

with

conda create -p "${SCT_DIR}"/envs/venv_sct

and

conda activate venv_sct

with

conda activate "${SCT_DIR}"/envs/venv_sct

Actually it wasn't quite that, but close:

p115628@joplin:~/spinalcordtoolbox$ git diff
diff --git a/install_sct b/install_sct
index e3ef9d80..0a0f7170 100755
--- a/install_sct
+++ b/install_sct
@@ -593,7 +593,7 @@ find "$SCT_DIR/$PYTHON_DIR" -type f -exec touch {} +
 
 # create conda environment
 print info "Creating conda environment..."
-python/bin/conda create -y -n venv_sct python=3.8
+python/bin/conda create -y -p "${SCT_DIR}/${PYTHON_DIR}"/envs/venv_sct python=3.8
 
 # Reapply the touch fix to avoid `pip` connection issues on WSL
 find "$SCT_DIR/$PYTHON_DIR" -type f -exec touch {} +
@@ -608,7 +608,7 @@ echo "include-system-site-packages = false" > "$SCT_DIR/$PYTHON_DIR/envs/venv_sc
 # shellcheck disable=SC1091
 source python/etc/profile.d/conda.sh
 set +u #disable safeties, for conda is not written to their standard.
-conda activate venv_sct
+conda activate "${SCT_DIR}/${PYTHON_DIR}"/envs/venv_sct
 set -u # reactivate safeties
 
 # double-check conda activated (it can be glitchy): https://github.com/spinalcordtoolbox/spinalcordtoolbox/issues/3029

The installer worked (modulo the current #3980 problem)

p115628@joplin:~/spinalcordtoolbox$ ./install_sct -y
 non-interactive mode


*******************************
* Welcome to SCT installation *
*******************************



Checking OS type and version...

Linux joplin.neuro.polymtl.ca 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Checking requirements...


OK!


SCT version ......... dev
Installation type ... in-place
Operating system .... linux (unknown)
Shell config ........ /home/GRAMES.POLYMTL.CA/p115628/.bashrc

--> Crash reports will not be sent.


SCT will be installed here: [/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox]


Skipping copy of source files (source and destination folders are the same)


Removing sct and isct softlink from /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin


rm -rf /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python


mkdir -p /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python


Downloading Miniconda...


wget -nv -O /tmp/tmp.WN1dP2SQmi/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

2022-12-19 19:35:32 URL:https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh [76607678/76607678] -> "/tmp/tmp.WN1dP2SQmi/miniconda.sh" [1]

Installing Miniconda...


bash /tmp/tmp.WN1dP2SQmi/miniconda.sh -p /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python -b -f

PREFIX=/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python
Unpacking payload ...
Collecting package metadata (current_repodata.json): ...working... done                                       
Solving environment: ...working... done

## Package Plan ##

  environment location: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python

  added / updated specs:
    - _libgcc_mutex==0.1=main
    - _openmp_mutex==4.5=1_gnu
    - brotlipy==0.7.0=py39h27cfd23_1003
    - ca-certificates==2022.3.29=h06a4308_1
    - certifi==2021.10.8=py39h06a4308_2
    - cffi==1.15.0=py39hd667e15_1
    - charset-normalizer==2.0.4=pyhd3eb1b0_0
    - colorama==0.4.4=pyhd3eb1b0_0
    - conda-content-trust==0.1.1=pyhd3eb1b0_0
    - conda-package-handling==1.8.1=py39h7f8727e_0
    - conda==4.12.0=py39h06a4308_0
    - cryptography==36.0.0=py39h9ce1e76_0
    - idna==3.3=pyhd3eb1b0_0
    - ld_impl_linux-64==2.35.1=h7274673_9
    - libffi==3.3=he6710b0_2
    - libgcc-ng==9.3.0=h5101ec6_17
    - libgomp==9.3.0=h5101ec6_17
    - libstdcxx-ng==9.3.0=hd4cf53a_17
    - ncurses==6.3=h7f8727e_2
    - openssl==1.1.1n=h7f8727e_0
    - pip==21.2.4=py39h06a4308_0
    - pycosat==0.6.3=py39h27cfd23_0
    - pycparser==2.21=pyhd3eb1b0_0
    - pyopenssl==22.0.0=pyhd3eb1b0_0
    - pysocks==1.7.1=py39h06a4308_0
    - python==3.9.12=h12debd9_0
    - readline==8.1.2=h7f8727e_1
    - requests==2.27.1=pyhd3eb1b0_0
    - ruamel_yaml==0.15.100=py39h27cfd23_0
    - setuptools==61.2.0=py39h06a4308_0
    - six==1.16.0=pyhd3eb1b0_1
    - sqlite==3.38.2=hc218d9a_0
    - tk==8.6.11=h1ccaba5_0
    - tqdm==4.63.0=pyhd3eb1b0_0
    - tzdata==2022a=hda174b7_0
    - urllib3==1.26.8=pyhd3eb1b0_0
    - wheel==0.37.1=pyhd3eb1b0_0
    - xz==5.2.5=h7b6447c_0
    - yaml==0.2.5=h7b6447c_0
    - zlib==1.2.12=h7f8727e_1


The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  _openmp_mutex      pkgs/main/linux-64::_openmp_mutex-4.5-1_gnu
  brotlipy           pkgs/main/linux-64::brotlipy-0.7.0-py39h27cfd23_1003
  ca-certificates    pkgs/main/linux-64::ca-certificates-2022.3.29-h06a4308_1
  certifi            pkgs/main/linux-64::certifi-2021.10.8-py39h06a4308_2
  cffi               pkgs/main/linux-64::cffi-1.15.0-py39hd667e15_1
  charset-normalizer pkgs/main/noarch::charset-normalizer-2.0.4-pyhd3eb1b0_0
  colorama           pkgs/main/noarch::colorama-0.4.4-pyhd3eb1b0_0
  conda              pkgs/main/linux-64::conda-4.12.0-py39h06a4308_0
  conda-content-tru~ pkgs/main/noarch::conda-content-trust-0.1.1-pyhd3eb1b0_0
  conda-package-han~ pkgs/main/linux-64::conda-package-handling-1.8.1-py39h7f8727e_0
  cryptography       pkgs/main/linux-64::cryptography-36.0.0-py39h9ce1e76_0
  idna               pkgs/main/noarch::idna-3.3-pyhd3eb1b0_0
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.35.1-h7274673_9
  libffi             pkgs/main/linux-64::libffi-3.3-he6710b0_2
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.3.0-h5101ec6_17
  libgomp            pkgs/main/linux-64::libgomp-9.3.0-h5101ec6_17
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.3.0-hd4cf53a_17
  ncurses            pkgs/main/linux-64::ncurses-6.3-h7f8727e_2
  openssl            pkgs/main/linux-64::openssl-1.1.1n-h7f8727e_0
  pip                pkgs/main/linux-64::pip-21.2.4-py39h06a4308_0
  pycosat            pkgs/main/linux-64::pycosat-0.6.3-py39h27cfd23_0
  pycparser          pkgs/main/noarch::pycparser-2.21-pyhd3eb1b0_0
  pyopenssl          pkgs/main/noarch::pyopenssl-22.0.0-pyhd3eb1b0_0
  pysocks            pkgs/main/linux-64::pysocks-1.7.1-py39h06a4308_0
  python             pkgs/main/linux-64::python-3.9.12-h12debd9_0
  readline           pkgs/main/linux-64::readline-8.1.2-h7f8727e_1
  requests           pkgs/main/noarch::requests-2.27.1-pyhd3eb1b0_0
  ruamel_yaml        pkgs/main/linux-64::ruamel_yaml-0.15.100-py39h27cfd23_0
  setuptools         pkgs/main/linux-64::setuptools-61.2.0-py39h06a4308_0
  six                pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_1
  sqlite             pkgs/main/linux-64::sqlite-3.38.2-hc218d9a_0
  tk                 pkgs/main/linux-64::tk-8.6.11-h1ccaba5_0
  tqdm               pkgs/main/noarch::tqdm-4.63.0-pyhd3eb1b0_0
  tzdata             pkgs/main/noarch::tzdata-2022a-hda174b7_0
  urllib3            pkgs/main/noarch::urllib3-1.26.8-pyhd3eb1b0_0
  wheel              pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
  xz                 pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
  yaml               pkgs/main/linux-64::yaml-0.2.5-h7b6447c_0
  zlib               pkgs/main/linux-64::zlib-1.2.12-h7f8727e_1


Preparing transaction: ...working... done
Executing transaction: ...working... done
installation finished.

Creating conda environment...

Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done


==> WARNING: A newer version of conda exists. <==
  current version: 4.12.0
  latest version: 22.11.1

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python/envs/venv_sct

  added / updated specs:
    - python=3.8


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    _openmp_mutex-5.1          |            1_gnu          21 KB
    ca-certificates-2022.10.11 |       h06a4308_0         124 KB
    certifi-2022.9.24          |   py38h06a4308_0         154 KB
    ld_impl_linux-64-2.38      |       h1181459_1         654 KB
    libffi-3.4.2               |       h6a678d5_6         136 KB
    libgcc-ng-11.2.0           |       h1234567_1         5.3 MB
    libgomp-11.2.0             |       h1234567_1         474 KB
    libstdcxx-ng-11.2.0        |       h1234567_1         4.7 MB
    ncurses-6.3                |       h5eee18b_3         781 KB
    openssl-1.1.1s             |       h7f8727e_0         3.6 MB
    pip-22.3.1                 |   py38h06a4308_0         2.7 MB
    python-3.8.15              |       h7a1cb2a_2        20.1 MB
    readline-8.2               |       h5eee18b_0         357 KB
    setuptools-65.5.0          |   py38h06a4308_0         1.1 MB
    sqlite-3.40.0              |       h5082296_0         1.2 MB
    tk-8.6.12                  |       h1ccaba5_0         3.0 MB
    xz-5.2.8                   |       h5eee18b_0         429 KB
    zlib-1.2.13                |       h5eee18b_0         103 KB
    ------------------------------------------------------------
                                           Total:        44.9 MB

The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  _openmp_mutex      pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu
  ca-certificates    pkgs/main/linux-64::ca-certificates-2022.10.11-h06a4308_0
  certifi            pkgs/main/linux-64::certifi-2022.9.24-py38h06a4308_0
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.38-h1181459_1
  libffi             pkgs/main/linux-64::libffi-3.4.2-h6a678d5_6
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-11.2.0-h1234567_1
  libgomp            pkgs/main/linux-64::libgomp-11.2.0-h1234567_1
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-11.2.0-h1234567_1
  ncurses            pkgs/main/linux-64::ncurses-6.3-h5eee18b_3
  openssl            pkgs/main/linux-64::openssl-1.1.1s-h7f8727e_0
  pip                pkgs/main/linux-64::pip-22.3.1-py38h06a4308_0
  python             pkgs/main/linux-64::python-3.8.15-h7a1cb2a_2
  readline           pkgs/main/linux-64::readline-8.2-h5eee18b_0
  setuptools         pkgs/main/linux-64::setuptools-65.5.0-py38h06a4308_0
  sqlite             pkgs/main/linux-64::sqlite-3.40.0-h5082296_0
  tk                 pkgs/main/linux-64::tk-8.6.12-h1ccaba5_0
  wheel              pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
  xz                 pkgs/main/linux-64::xz-5.2.8-h5eee18b_0
  zlib               pkgs/main/linux-64::zlib-1.2.13-h5eee18b_0



Downloading and Extracting Packages
pip-22.3.1           | 2.7 MB    | ########## | 100% 
_openmp_mutex-5.1    | 21 KB     | ########## | 100% 
xz-5.2.8             | 429 KB    | ########## | 100% 
libffi-3.4.2         | 136 KB    | ########## | 100% 
openssl-1.1.1s       | 3.6 MB    | ########## | 100% 
libstdcxx-ng-11.2.0  | 4.7 MB    | ########## | 100% 
ca-certificates-2022 | 124 KB    | ########## | 100% 
zlib-1.2.13          | 103 KB    | ########## | 100% 
ncurses-6.3          | 781 KB    | ########## | 100% 
libgcc-ng-11.2.0     | 5.3 MB    | ########## | 100% 
setuptools-65.5.0    | 1.1 MB    | ########## | 100% 
ld_impl_linux-64-2.3 | 654 KB    | ########## | 100% 
certifi-2022.9.24    | 154 KB    | ########## | 100% 
readline-8.2         | 357 KB    | ########## | 100% 
python-3.8.15        | 20.1 MB   | ########## | 100% 
tk-8.6.12            | 3.0 MB    | ########## | 100% 
sqlite-3.40.0        | 1.2 MB    | ########## | 100% 
libgomp-11.2.0       | 474 KB    | ########## | 100% 
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
#
# To activate this environment, use
#
#     $ conda activate /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python/envs/venv_sct
#
# To deactivate an active environment, use
#
#     $ conda deactivate


Validating that conda environment can be activated...

Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done


==> WARNING: A newer version of conda exists. <==
  current version: 4.12.0
  latest version: 22.11.1

Please update conda by running

    $ conda update -n base -c defaults conda



## Package Plan ##

  environment location: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python/envs/venv_sct

  added / updated specs:
    - libstdcxx-ng


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2022.12.7  |       ha878542_0         143 KB  conda-forge
    certifi-2022.12.7          |     pyhd8ed1ab_0         147 KB  conda-forge
    libstdcxx-ng-12.2.0        |      h46fd767_19         4.3 MB  conda-forge
    ------------------------------------------------------------
                                           Total:         4.6 MB

The following packages will be UPDATED:

  ca-certificates    pkgs/main::ca-certificates-2022.10.11~ --> conda-forge::ca-certificates-2022.12.7-ha878542_0
  certifi            pkgs/main/linux-64::certifi-2022.9.24~ --> conda-forge/noarch::certifi-2022.12.7-pyhd8ed1ab_0
  libstdcxx-ng       pkgs/main::libstdcxx-ng-11.2.0-h12345~ --> conda-forge::libstdcxx-ng-12.2.0-h46fd767_19



Downloading and Extracting Packages
certifi-2022.12.7    | 147 KB    | ########## | 100% 
libstdcxx-ng-12.2.0  | 4.3 MB    | ########## | 100% 
ca-certificates-2022 | 143 KB    | ########## | 100% 
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Requirement already satisfied: pip!=21.2.* in ./python/envs/venv_sct/lib/python3.8/site-packages (22.3.1)

Installing Python dependencies...


Using requirements.txt (git installation)

Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cpu
Ignoring msvc-runtime: markers 'sys_platform == "win32"' don't match your environment
Collecting certifi
  Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Collecting dipy
  Using cached dipy-1.5.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (7.9 MB)
Collecting ivadomed~=2.9.6
  Using cached ivadomed-2.9.7-py3-none-any.whl (231 kB)
Collecting matplotlib
  Using cached matplotlib-3.6.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (9.4 MB)
Collecting nibabel
  Using cached nibabel-4.0.2-py3-none-any.whl (3.3 MB)
Collecting nilearn
  Using cached nilearn-0.9.2-py3-none-any.whl (9.6 MB)
Collecting numpy
  Using cached numpy-1.24.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
Collecting onnxruntime>=1.7.0
  Using cached onnxruntime-1.13.1-cp38-cp38-manylinux_2_27_x86_64.whl (4.5 MB)
Collecting pandas
  Using cached pandas-1.5.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
Collecting portalocker
  Using cached portalocker-2.6.0-py2.py3-none-any.whl (15 kB)
Collecting psutil
  Using cached psutil-5.9.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (280 kB)
Collecting pyqt5<5.15.0,>=5.12.0
  Using cached PyQt5-5.14.2-5.14.2-cp35.cp36.cp37.cp38-abi3-manylinux2014_x86_64.whl (63.6 MB)
Collecting pytest
  Using cached pytest-7.2.0-py3-none-any.whl (316 kB)
Collecting pytest-cov
  Using cached pytest_cov-4.0.0-py3-none-any.whl (21 kB)
Collecting raven
  Using cached raven-6.10.0-py2.py3-none-any.whl (284 kB)
Collecting requests
  Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting requirements-parser
  Using cached requirements_parser-0.5.0-py3-none-any.whl (18 kB)
Collecting scipy
  Using cached scipy-1.9.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (33.8 MB)
Collecting scikit-image
  Using cached scikit_image-0.19.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.0 MB)
Collecting scikit-learn
  Using cached scikit_learn-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.7 MB)
Collecting xlwt
  Using cached xlwt-1.3.0-py2.py3-none-any.whl (99 kB)
Collecting tqdm
  Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
Collecting transforms3d
  Using cached transforms3d-0.4.1-py3-none-any.whl
Collecting urllib3[secure]
  Using cached urllib3-1.26.13-py2.py3-none-any.whl (140 kB)
Collecting pytest_console_scripts
  Using cached pytest_console_scripts-1.3.1-py3-none-any.whl (9.0 kB)
Collecting pyyaml
  Using cached PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (701 kB)
Collecting voxelmorph
  Using cached voxelmorph-0.2-py3-none-any.whl (54 kB)
Collecting wquantiles
  Using cached wquantiles-0.6-py3-none-any.whl (3.3 kB)
Collecting h5py>=2.8.0
  Using cached h5py-3.7.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (4.5 MB)
Collecting torch<=1.11.0,>=1.8.1
  Using cached https://download.pytorch.org/whl/cpu/torch-1.11.0%2Bcpu-cp38-cp38-linux_x86_64.whl (169.2 MB)
Collecting tensorboard>=1.15.0
  Using cached tensorboard-2.11.0-py3-none-any.whl (6.0 MB)
Collecting pandas
  Using cached pandas-1.4.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)
Collecting seaborn~=0.11
  Using cached seaborn-0.12.1-py3-none-any.whl (288 kB)
Collecting loguru~=0.5
  Using cached loguru-0.6.0-py3-none-any.whl (58 kB)
Collecting nibabel
  Using cached nibabel-3.2.2-py3-none-any.whl (3.3 MB)
Collecting torchvision<=0.12.0,>=0.9.1
  Using cached https://download.pytorch.org/whl/cpu/torchvision-0.12.0%2Bcpu-cp38-cp38-linux_x86_64.whl (14.7 MB)
Collecting wandb>=0.12.11
  Using cached wandb-0.13.7-py2.py3-none-any.whl (1.9 MB)
Collecting pybids>=0.14.0
  Using cached pybids-0.15.5-py3-none-any.whl (14.9 MB)
Collecting csv-diff>=1.0
  Using cached csv_diff-1.1-py3-none-any.whl (12 kB)
Collecting pyparsing<3,>=2.0.2
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting joblib~=1.0
  Using cached joblib-1.2.0-py3-none-any.whl (297 kB)
Collecting imageio~=2.19
  Using cached imageio-2.23.0-py3-none-any.whl (3.4 MB)
Collecting torchio>=0.18.68
  Using cached torchio-0.18.86-py2.py3-none-any.whl (172 kB)
Collecting pillow>=6.2.0
  Using cached Pillow-9.3.0-cp38-cp38-manylinux_2_28_x86_64.whl (3.3 MB)
Collecting python-dateutil>=2.7
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting kiwisolver>=1.0.1
  Using cached kiwisolver-1.4.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.2 MB)
Collecting contourpy>=1.0.1
  Using cached contourpy-1.0.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (295 kB)
Collecting packaging>=20.0
  Using cached packaging-22.0-py3-none-any.whl (42 kB)
Collecting fonttools>=4.22.0
  Using cached fonttools-4.38.0-py3-none-any.whl (965 kB)
Collecting cycler>=0.10
  Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting setuptools
  Using cached setuptools-65.6.3-py3-none-any.whl (1.2 MB)
Collecting lxml
  Using cached lxml-4.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (7.1 MB)
Collecting sympy
  Using cached sympy-1.11.1-py3-none-any.whl (6.5 MB)
Collecting protobuf
  Using cached protobuf-4.21.12-cp37-abi3-manylinux2014_x86_64.whl (409 kB)
Collecting coloredlogs
  Using cached coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)
Collecting flatbuffers
  Using cached flatbuffers-22.12.6-py2.py3-none-any.whl (26 kB)
Collecting pytz>=2020.1
  Using cached pytz-2022.7-py2.py3-none-any.whl (499 kB)
Collecting PyQt5-sip<13,>=12.7
  Using cached PyQt5_sip-12.11.0-cp38-cp38-manylinux1_x86_64.whl (361 kB)
Collecting exceptiongroup>=1.0.0rc8
  Using cached exceptiongroup-1.0.4-py3-none-any.whl (14 kB)
Collecting pluggy<2.0,>=0.12
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting tomli>=1.0.0
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting iniconfig
  Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting attrs>=19.2.0
  Using cached attrs-22.1.0-py2.py3-none-any.whl (58 kB)
Collecting coverage[toml]>=5.2.1
  Using cached coverage-7.0.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (217 kB)
Collecting charset-normalizer<3,>=2
  Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting types-setuptools>=57.0.0
  Using cached types_setuptools-65.6.0.2-py3-none-any.whl (48 kB)
Collecting tifffile>=2019.7.26
  Using cached tifffile-2022.10.10-py3-none-any.whl (210 kB)
Collecting PyWavelets>=1.1.1
  Using cached PyWavelets-1.4.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.9 MB)
Collecting networkx>=2.2
  Using cached networkx-2.8.8-py3-none-any.whl (2.0 MB)
Collecting threadpoolctl>=2.0.0
  Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting urllib3-secure-extra
  Using cached urllib3_secure_extra-0.1.0-py2.py3-none-any.whl (1.4 kB)
Collecting cryptography>=1.3.4
  Using cached cryptography-38.0.4-cp36-abi3-manylinux_2_28_x86_64.whl (4.2 MB)
Collecting pyOpenSSL>=0.14
  Using cached pyOpenSSL-22.1.0-py3-none-any.whl (57 kB)
Collecting neurite>=0.2
  Using cached neurite-0.2-py3-none-any.whl (108 kB)
Collecting cffi>=1.12
  Using cached cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (442 kB)
Collecting dictdiffer
  Using cached dictdiffer-0.9.0-py2.py3-none-any.whl (16 kB)
Collecting click
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting pystrum>=0.2
  Using cached pystrum-0.2-py3-none-any.whl (19 kB)
Collecting six
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting sqlalchemy<1.4.0.dev0
  Using cached SQLAlchemy-1.3.24-cp38-cp38-manylinux2010_x86_64.whl (1.3 MB)
Collecting num2words
  Using cached num2words-0.5.12-py3-none-any.whl (125 kB)
Collecting bids-validator
  Using cached bids_validator-1.9.9-py2.py3-none-any.whl (21 kB)
Collecting formulaic<0.4,>=0.2.4
  Using cached formulaic-0.3.4-py3-none-any.whl (68 kB)
Collecting protobuf
  Using cached protobuf-3.20.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB)
Collecting tensorboard-data-server<0.7.0,>=0.6.0
  Using cached tensorboard_data_server-0.6.1-py3-none-manylinux2010_x86_64.whl (4.9 MB)
Collecting werkzeug>=1.0.1
  Using cached Werkzeug-2.2.2-py3-none-any.whl (232 kB)
Collecting markdown>=2.6.8
  Using cached Markdown-3.4.1-py3-none-any.whl (93 kB)
Collecting absl-py>=0.4
  Using cached absl_py-1.3.0-py3-none-any.whl (124 kB)
Collecting wheel>=0.26
  Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Collecting tensorboard-plugin-wit>=1.6.0
  Using cached tensorboard_plugin_wit-1.8.1-py3-none-any.whl (781 kB)
Collecting grpcio>=1.24.3
  Using cached grpcio-1.51.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.8 MB)
Collecting google-auth<3,>=1.6.3
  Using cached google_auth-2.15.0-py2.py3-none-any.whl (177 kB)
Collecting google-auth-oauthlib<0.5,>=0.4.1
  Using cached google_auth_oauthlib-0.4.6-py2.py3-none-any.whl (18 kB)
Collecting typing-extensions
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting typer[all]
  Using cached typer-0.7.0-py3-none-any.whl (38 kB)
Collecting humanize
  Using cached humanize-4.4.0-py3-none-any.whl (106 kB)
Collecting Deprecated
  Using cached Deprecated-1.2.13-py2.py3-none-any.whl (9.6 kB)
Collecting SimpleITK!=2.0.*,!=2.1.1.1
  Using cached SimpleITK-2.2.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (52.7 MB)
Collecting GitPython>=1.0.0
  Using cached GitPython-3.1.29-py3-none-any.whl (182 kB)
Collecting pathtools
  Using cached pathtools-0.1.2-py3-none-any.whl
Collecting sentry-sdk>=1.0.0
  Using cached sentry_sdk-1.12.1-py2.py3-none-any.whl (174 kB)
Collecting setproctitle
  Using cached setproctitle-1.3.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (31 kB)
Collecting shortuuid>=0.5.0
  Using cached shortuuid-1.0.11-py3-none-any.whl (10 kB)
Collecting promise<3,>=2.0
  Using cached promise-2.3-py3-none-any.whl
Collecting docker-pycreds>=0.4.0
  Using cached docker_pycreds-0.4.0-py2.py3-none-any.whl (9.0 kB)
Collecting humanfriendly>=9.1
  Using cached humanfriendly-10.0-py2.py3-none-any.whl (86 kB)
Collecting mpmath>=0.19
  Using cached mpmath-1.2.1-py3-none-any.whl (532 kB)
Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting astor>=0.8
  Using cached astor-0.8.1-py2.py3-none-any.whl (27 kB)
Collecting interface-meta<2.0.0,>=1.2.0
  Using cached interface_meta-1.3.0-py3-none-any.whl (14 kB)
Collecting wrapt>=1.0
  Using cached wrapt-1.14.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (81 kB)
Collecting gitdb<5,>=4.0.1
  Using cached gitdb-4.0.10-py3-none-any.whl (62 kB)
Collecting cachetools<6.0,>=2.0.0
  Using cached cachetools-5.2.0-py3-none-any.whl (9.3 kB)
Collecting rsa<5,>=3.1.4
  Using cached rsa-4.9-py3-none-any.whl (34 kB)
Collecting pyasn1-modules>=0.2.1
  Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting requests-oauthlib>=0.7.0
  Using cached requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Collecting importlib-metadata>=4.4
  Using cached importlib_metadata-5.2.0-py3-none-any.whl (21 kB)
Collecting MarkupSafe>=2.1.1
  Using cached MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting docopt>=0.6.2
  Using cached docopt-0.6.2-py2.py3-none-any.whl
Collecting rich<13.0.0,>=10.11.0
  Using cached rich-12.6.0-py3-none-any.whl (237 kB)
Collecting colorama<0.5.0,>=0.4.3
  Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting shellingham<2.0.0,>=1.3.0
  Using cached shellingham-1.5.0-py2.py3-none-any.whl (9.3 kB)
Collecting smmap<6,>=3.0.1
  Using cached smmap-5.0.0-py3-none-any.whl (24 kB)
Collecting zipp>=0.5
  Using cached zipp-3.11.0-py3-none-any.whl (6.6 kB)
Collecting pyasn1<0.5.0,>=0.4.6
  Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting oauthlib>=3.0.0
  Using cached oauthlib-3.2.2-py3-none-any.whl (151 kB)
Collecting pygments<3.0.0,>=2.6.0
  Using cached Pygments-2.13.0-py3-none-any.whl (1.1 MB)
Collecting commonmark<0.10.0,>=0.9.0
  Using cached commonmark-0.9.1-py2.py3-none-any.whl (51 kB)
Installing collected packages: xlwt, urllib3-secure-extra, types-setuptools, tensorboard-plugin-wit, SimpleITK, raven, pytz, pyasn1, pathtools, mpmath, iniconfig, flatbuffers, docopt, dictdiffer, commonmark, bids-validator, zipp, wrapt, wheel, urllib3, typing-extensions, transforms3d, tqdm, tomli, threadpoolctl, tensorboard-data-server, sympy, sqlalchemy, smmap, six, shortuuid, shellingham, setuptools, setproctitle, rsa, requirements-parser, pyyaml, PyQt5-sip, pyparsing, pygments, pycparser, pyasn1-modules, psutil, protobuf, portalocker, pluggy, pillow, packaging, oauthlib, numpy, num2words, networkx, MarkupSafe, lxml, loguru, kiwisolver, joblib, interface-meta, idna, humanize, humanfriendly, grpcio, fonttools, exceptiongroup, cycler, coverage, colorama, click, charset-normalizer, certifi, cachetools, attrs, astor, absl-py, wquantiles, werkzeug, typer, torch, tifffile, sentry-sdk, scipy, rich, requests, PyWavelets, python-dateutil, pytest, pyqt5, promise, nibabel, importlib-metadata, imageio, h5py, google-auth, gitdb, docker-pycreds, Deprecated, csv-diff, contourpy, coloredlogs, cffi, torchvision, scikit-learn, scikit-image, requests-oauthlib, pytest-cov, pytest_console_scripts, pandas, onnxruntime, matplotlib, markdown, GitPython, dipy, cryptography, wandb, torchio, seaborn, pystrum, pyOpenSSL, nilearn, google-auth-oauthlib, formulaic, tensorboard, pybids, neurite, voxelmorph, ivadomed
Successfully installed Deprecated-1.2.13 GitPython-3.1.29 MarkupSafe-2.1.1 PyQt5-sip-12.11.0 PyWavelets-1.4.1 SimpleITK-2.2.1 absl-py-1.3.0 astor-0.8.1 attrs-22.1.0 bids-validator-1.9.9 cachetools-5.2.0 certifi-2022.12.7 cffi-1.15.1 charset-normalizer-2.1.1 click-8.1.3 colorama-0.4.6 coloredlogs-15.0.1 commonmark-0.9.1 contourpy-1.0.6 coverage-7.0.0 cryptography-38.0.4 csv-diff-1.1 cycler-0.11.0 dictdiffer-0.9.0 dipy-1.5.0 docker-pycreds-0.4.0 docopt-0.6.2 exceptiongroup-1.0.4 flatbuffers-22.12.6 fonttools-4.38.0 formulaic-0.3.4 gitdb-4.0.10 google-auth-2.15.0 google-auth-oauthlib-0.4.6 grpcio-1.51.1 h5py-3.7.0 humanfriendly-10.0 humanize-4.4.0 idna-3.4 imageio-2.23.0 importlib-metadata-5.2.0 iniconfig-1.1.1 interface-meta-1.3.0 ivadomed-2.9.7 joblib-1.2.0 kiwisolver-1.4.4 loguru-0.6.0 lxml-4.9.2 markdown-3.4.1 matplotlib-3.6.2 mpmath-1.2.1 networkx-2.8.8 neurite-0.2 nibabel-3.2.2 nilearn-0.9.2 num2words-0.5.12 numpy-1.24.0 oauthlib-3.2.2 onnxruntime-1.13.1 packaging-22.0 pandas-1.4.4 pathtools-0.1.2 pillow-9.3.0 pluggy-1.0.0 portalocker-2.6.0 promise-2.3 protobuf-3.20.3 psutil-5.9.4 pyOpenSSL-22.1.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pybids-0.15.5 pycparser-2.21 pygments-2.13.0 pyparsing-2.4.7 pyqt5-5.14.2 pystrum-0.2 pytest-7.2.0 pytest-cov-4.0.0 pytest_console_scripts-1.3.1 python-dateutil-2.8.2 pytz-2022.7 pyyaml-6.0 raven-6.10.0 requests-2.28.1 requests-oauthlib-1.3.1 requirements-parser-0.5.0 rich-12.6.0 rsa-4.9 scikit-image-0.19.3 scikit-learn-1.2.0 scipy-1.9.3 seaborn-0.12.1 sentry-sdk-1.12.1 setproctitle-1.3.2 setuptools-65.6.3 shellingham-1.5.0 shortuuid-1.0.11 six-1.16.0 smmap-5.0.0 sqlalchemy-1.3.24 sympy-1.11.1 tensorboard-2.11.0 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.1 threadpoolctl-3.1.0 tifffile-2022.10.10 tomli-2.0.1 torch-1.11.0+cpu torchio-0.18.86 torchvision-0.12.0+cpu tqdm-4.64.1 transforms3d-0.4.1 typer-0.7.0 types-setuptools-65.6.0.2 typing-extensions-4.4.0 urllib3-1.26.13 urllib3-secure-extra-0.1.0 voxelmorph-0.2 wandb-0.13.7 werkzeug-2.2.2 wheel-0.38.4 wquantiles-0.6 wrapt-1.14.1 xlwt-1.3.0 zipp-3.11.0

Installing spinalcordtoolbox...

Obtaining file:///home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Installing collected packages: spinalcordtoolbox
  Running setup.py develop for spinalcordtoolbox
Successfully installed spinalcordtoolbox-dev

Creating launchers for Python scripts...


Installing binaries...


sct_download_data -d binaries_linux -k


--
Spinal Cord Toolbox (git-master-a0aff1115d36dcae447360e3b66811f4b7105bee*)

sct_download_data -d binaries_linux -k
--

Trying URL: https://github.com/spinalcordtoolbox/spinalcordtoolbox-binaries/releases/download/r20221109/spinalcordtoolbox-binaries_linux.tar.gz
Downloading: spinalcordtoolbox-binaries_linux.tar.gz
Status: 100%|██████████| 83.7M/83.7M [00:01<00:00, 70.5MB/s]Creating temporary folder (/tmp/sct-20221219193759.343734-uivc4ku8)
Unzip data to: /tmp/sct-20221219193759.343734-uivc4ku8
Copying data to: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin
Updating existing '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin/isct_ComposeMultiTransform'
Updating existing '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin/isct_antsApplyTransforms'
Updating existing '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin/isct_antsRegistration'
Updating existing '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin/isct_antsSliceRegularizedRegistration'
Updating existing '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin/isct_dice_coefficient'
Updating existing '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin/isct_propseg'
Updating existing '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin/isct_spine_detect'
Updating existing '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin/isct_stitching'
Updating existing '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin/isct_train_svm'
Updating existing '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin/copyright/LICENSE_ANTs.txt'
Updating existing '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin/copyright/LICENSE_ctrDetect.txt'
Updating existing '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin/copyright/LICENSE_opencv.txt'
Updating existing '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/bin/copyright/LICENSE_stitching.txt'
Removing temporary folders...

Done!


All requirements installed!


Installing data...


mkdir -p /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data


sct_download_data -d PAM50


--
Spinal Cord Toolbox (git-master-a0aff1115d36dcae447360e3b66811f4b7105bee*)

sct_download_data -d PAM50
--

Removing existing destination folder '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/PAM50'
Trying URL: https://github.com/spinalcordtoolbox/PAM50/releases/download/r20201104/PAM50-r20201104.zip
Downloading: PAM50-r20201104.zip
Status: 100%|██████████| 70.9M/70.9M [00:01<00:00, 55.7MB/s]Creating temporary folder (/tmp/sct-20221219193803.938493-3kw_u17n)
Unzip data to: /tmp/sct-20221219193803.938493-3kw_u17n
Copying data to: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/PAM50
Removing temporary folders...

Done!


sct_download_data -d gm_model


--
Spinal Cord Toolbox (git-master-a0aff1115d36dcae447360e3b66811f4b7105bee*)

sct_download_data -d gm_model
--

Removing existing destination folder '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/gm_model'
Trying URL: https://osf.io/ugscu/?action=download
Downloading: 20160922_gm_model.zip
Status: 100%|██████████| 10.3M/10.3M [00:00<00:00, 60.5MB/s]Creating temporary folder (/tmp/sct-20221219193805.958543-pmmn2m2j)
Unzip data to: /tmp/sct-20221219193805.958543-pmmn2m2j
Copying data to: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/gm_model
Removing temporary folders...

Done!


sct_download_data -d optic_models


--
Spinal Cord Toolbox (git-master-a0aff1115d36dcae447360e3b66811f4b7105bee*)

sct_download_data -d optic_models
--

Removing existing destination folder '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/optic_models'
Trying URL: https://github.com/spinalcordtoolbox/optic_models/releases/download/r20170413/20170413_optic_models.zip
Downloading: 20170413_optic_models.zip
Status: 100%|██████████| 17.7k/17.7k [00:00<00:00, 37.0MB/s]Creating temporary folder (/tmp/sct-20221219193806.958271-tbtxx3sj)
Unzip data to: /tmp/sct-20221219193806.958271-tbtxx3sj
Copying data to: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/optic_models
Removing temporary folders...

Done!


sct_download_data -d pmj_models


--
Spinal Cord Toolbox (git-master-a0aff1115d36dcae447360e3b66811f4b7105bee*)

sct_download_data -d pmj_models
--

Removing existing destination folder '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/pmj_models'
Trying URL: https://github.com/spinalcordtoolbox/pmj_models/releases/download/r20170922/20170922_pmj_models.zip
Downloading: 20170922_pmj_models.zip
Status: 100%|██████████| 8.87k/8.87k [00:00<00:00, 27.0MB/s]Creating temporary folder (/tmp/sct-20221219193807.803235-_1jy9dj3)
Unzip data to: /tmp/sct-20221219193807.803235-_1jy9dj3
Copying data to: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/pmj_models
Removing temporary folders...

Done!


sct_download_data -d deepseg_sc_models


--
Spinal Cord Toolbox (git-master-a0aff1115d36dcae447360e3b66811f4b7105bee*)

sct_download_data -d deepseg_sc_models
--

Removing existing destination folder '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/deepseg_sc_models'
Trying URL: https://github.com/spinalcordtoolbox/deepseg_sc_models/releases/download/r20180610/20220325_deepseg_sc_models_onnx.zip
Downloading: 20220325_deepseg_sc_models_onnx.zip
Status: 100%|██████████| 19.5M/19.5M [00:00<00:00, 27.5MB/s]Creating temporary folder (/tmp/sct-20221219193809.562164-zix14250)
Unzip data to: /tmp/sct-20221219193809.562164-zix14250
Copying data to: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/deepseg_sc_models
Removing temporary folders...

Done!


sct_download_data -d deepseg_gm_models


--
Spinal Cord Toolbox (git-master-a0aff1115d36dcae447360e3b66811f4b7105bee*)

sct_download_data -d deepseg_gm_models
--

Removing existing destination folder '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/deepseg_gm_models'
Trying URL: https://github.com/spinalcordtoolbox/deepseg_gm_models/releases/download/r20180205/20220325_deepseg_gm_models_onnx.zip
Downloading: 20220325_deepseg_gm_models_onnx.zip
Status: 100%|██████████| 2.24M/2.24M [00:00<00:00, 94.9MB/s]Creating temporary folder (/tmp/sct-20221219193810.916079-agqtp4pp)
Unzip data to: /tmp/sct-20221219193810.916079-agqtp4pp
Copying data to: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/deepseg_gm_models
Removing temporary folders...

Done!


sct_download_data -d deepseg_lesion_models


--
Spinal Cord Toolbox (git-master-a0aff1115d36dcae447360e3b66811f4b7105bee*)

sct_download_data -d deepseg_lesion_models
--

Removing existing destination folder '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/deepseg_lesion_models'
Trying URL: https://github.com/spinalcordtoolbox/deepseg_lesion_models/releases/download/r20180613/20220325_deepseg_lesion_models_onnx.zip
Downloading: 20220325_deepseg_lesion_models_onnx.zip
Status: 100%|██████████| 5.35M/5.35M [00:00<00:00, 89.8MB/s]Creating temporary folder (/tmp/sct-20221219193811.922420-wsk73rm_)
Unzip data to: /tmp/sct-20221219193811.922420-wsk73rm_
Copying data to: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/deepseg_lesion_models
Removing temporary folders...

Done!


sct_download_data -d c2c3_disc_models


--
Spinal Cord Toolbox (git-master-a0aff1115d36dcae447360e3b66811f4b7105bee*)

sct_download_data -d c2c3_disc_models
--

Removing existing destination folder '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/c2c3_disc_models'
Trying URL: https://github.com/spinalcordtoolbox/c2c3_disc_models/releases/download/r20190117/20190117_c2c3_disc_models.zip
Downloading: 20190117_c2c3_disc_models.zip
Status: 100%|██████████| 8.94k/8.94k [00:00<00:00, 23.0MB/s]Creating temporary folder (/tmp/sct-20221219193812.849017-wivhs5wt)
Unzip data to: /tmp/sct-20221219193812.849017-wivhs5wt
Copying data to: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/c2c3_disc_models
Removing temporary folders...

Done!


sct_download_data -d deepreg_models


--
Spinal Cord Toolbox (git-master-a0aff1115d36dcae447360e3b66811f4b7105bee*)

sct_download_data -d deepreg_models
--

Removing existing destination folder '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/deepreg_models'
Trying URL: https://github.com/ivadomed/multimodal-registration/releases/download/r20220512/models.zip
Downloading: models.zip
Status: 100%|██████████| 158M/158M [00:02<00:00, 66.2MB/s]Creating temporary folder (/tmp/sct-20221219193816.200631-qp5fo52k)
Unzip data to: /tmp/sct-20221219193816.200631-qp5fo52k
Copying data to: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/deepreg_models
Removing temporary folders...

Done!

Removing existing destination folder '/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/data/deepseg_models/t2star_sc'
Status: 100%|██████████| 18.0M/18.0M [00:00<00:00, 49.0MB/s]

Validate installation...


--
Spinal Cord Toolbox (git-master-a0aff1115d36dcae447360e3b66811f4b7105bee*)

sct_check_dependencies 
--


SYSTEM INFORMATION
------------------
SCT info:
- version: git-master-a0aff1115d36dcae447360e3b66811f4b7105bee*
- path: /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox
OS: linux (Linux-5.15.0-56-generic-x86_64-with-glibc2.17)
CPU cores: Available: 128, Used by ITK functions: 128
RAM: Total: 257591MB, Used: 2389MB, Available: 235491MB

OPTIONAL DEPENDENCIES
---------------------
Check FSLeyes version...............................[OK] (1.5.0)

MANDATORY DEPENDENCIES
----------------------
Check Python executable.............................[OK]
  Using bundled python 3.8.15 (default, Nov 24 2022, 15:19:38) 
[GCC 11.2.0] at /home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python/envs/venv_sct/bin/python
Check if data are installed.........................[OK]
Check if dipy is installed..........................[OK] (1.5.0)
Check if ivadomed is installed......................[OK] (2.9.7)
Check if matplotlib is installed....................[OK] (3.6.2)
Check if nibabel is installed.......................[OK] (3.2.2)
Check if nilearn is installed.......................[OK] (0.9.2)
Check if numpy is installed.........................[OK] (1.24.0)
Check if onnxruntime is installed...................[OK] (1.13.1)
Check if pandas is installed........................[OK] (1.4.4)
Check if portalocker is installed...................[OK] (2.6.0)
Check if psutil is installed........................[OK] (5.9.4)
Check if pyqt5 is installed.........................[OK] (5.14.2)
Check if pytest is installed........................[OK] (7.2.0)
Check if pytest-cov is installed....................[OK] (4.0.0)
Check if raven is installed.........................[OK]
Check if requests is installed......................[OK] (2.28.1)
Check if requirements-parser is installed...........[OK]
Check if scipy is installed.........................[OK] (1.9.3)
Check if scikit-image is installed..................[OK] (0.19.3)
Check if scikit-learn is installed..................[OK] (1.2.0)
Check if xlwt is installed..........................[OK] (1.3.0)
Check if tqdm is installed..........................[OK] (4.64.1)
Check if transforms3d is installed..................[OK] (0.4.1)
Check if urllib3 is installed.......................[OK] (1.26.13)
Check if pytest_console_scripts is installed........[OK]
Check if pyyaml is installed........................[OK] (6.0)
Check if voxelmorph is installed....................[FAIL]
An error occured while importing module voxelmorph -> module 'numpy' has no attribute 'bool'
Full traceback: Traceback (most recent call last):
  File "/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/spinalcordtoolbox/scripts/sct_check_dependencies.py", line 299, in main
    module = module_import(module_name, suppress_stderr)
  File "/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/spinalcordtoolbox/scripts/sct_check_dependencies.py", line 105, in module_import
    module = importlib.import_module(module_name)
  File "/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python/envs/venv_sct/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python/envs/venv_sct/lib/python3.8/site-packages/voxelmorph/__init__.py", line 12, in <module>
    import neurite
  File "/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python/envs/venv_sct/lib/python3.8/site-packages/neurite/__init__.py", line 19, in <module>
    import pystrum
  File "/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python/envs/venv_sct/lib/python3.8/site-packages/pystrum/__init__.py", line 3, in <module>
    from . import pynd
  File "/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python/envs/venv_sct/lib/python3.8/site-packages/pystrum/pynd/__init__.py", line 1, in <module>
    from . import ndutils
  File "/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python/envs/venv_sct/lib/python3.8/site-packages/pystrum/pynd/ndutils.py", line 581, in <module>
    def sphere_vol(vol_shape, radius, center=None, dtype=np.bool):
  File "/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/python/envs/venv_sct/lib/python3.8/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'bool'

Check if wquantiles is installed....................[OK] (0.4)
Check if spinalcordtoolbox is installed.............[OK]
Check ANTs compatibility with OS ...................[OK]
Check PropSeg compatibility with OS ................[OK]
Check if figure can be opened with PyQt.............qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.


Installation validation Failed!


Installation failed!

Please find the file "/home/GRAMES.POLYMTL.CA/p115628/spinalcordtoolbox/install_sct_log.txt",
then upload it as a .txt attachment in a new topic on SCT's forum:
--> http://forum.spinalcordmri.org/c/sct

But this fix feels like polishing a dusty stone. Can we do better?

@joshuacwnewton
Copy link
Member

joshuacwnewton commented Dec 20, 2022

So, if I'm understanding correctly, the problem here is twofold:

  1. If a .condarc file is present in one of these locations, its configuration settings will apply globally to any conda command run from anywhere on the system (including the install_sct conda commands).
  2. The .condarc setting envs_dirs will hijack the location that conda environments are created in. (In other words, if only a name is provided, then the conda environment will not be created relative to the working directory, and will instead be created in the location specified by envs_dirs.)

The proposed fix addresses 2. by explicitly specifying a path via -p ("${SCT_DIR}/${PYTHON_DIR}"/envs/venv_sct) rather than a name via -n (venv_sct). 🎉

But this fix feels like polishing a dusty stone. Can we do better?

Snce SCT's goal is to be a completely isolated environment, separate from any existing conda installations, then ideally SCT's installer would address 1., too, by ignoring any and all .condarc settings?

In that case, what if we were to specify our own (sensibly defaulted) condarc file using the $CONDARC environment variable? As far as I understand, this will take precedence over any .condarc files found in the search path (2 > 1):

image

This would let us deal with the entirety of .condarc configuration bugs in one fell swoop, I think?

(Though, perhaps this has some unintended consequences? For example, if a user in a heavily-censored region has set proxy_servers or channels/default_channels to ensure conda access, then perhaps we do want to inherit these settings? So, maybe we should limit this to just overriding envs_dirs using the above precedence order. 🤔)

@kousu
Copy link
Contributor Author

kousu commented Dec 20, 2022

Ah nice. CONDARC is the kind of solution I can always count on you to research us up. There's probably a suite of other environment variables we should be setting too -- and then we'll have to think about if any of them need to remain set in ~/.bashrc (I don't think so? Since no one should be running conda after ./install_sct).

I think setting those envs is a better solution than -p, if we keep the assumption that SCT only works when containerized. It means we can't support people with unusual platforms, OS, proxy servers, etc -- people get what we give them and if we don't cover it, they're out of luck. There's a parallel with Discourse here: it's containerized and works well up front and out-of-the-box, but is a lot of work to adapt to unusual situations.

Since SCT's current design is container-ahoy, let's use CONDARC.

@joshuacwnewton
Copy link
Member

then we'll have to think about if any of them need to remain set in ~/.bashrc (I don't think so? Since no one should be running conda after ./install_sct).

Agreed!

There are some dev instructions that involve conda commands (1, 2), but I don't think we make any user-focused recommendations that involve SCT's conda environment.

Since SCT's current design is container-ahoy, let's use CONDARC.

👍

@joshuacwnewton joshuacwnewton self-assigned this Dec 22, 2022
@joshuacwnewton
Copy link
Member

joshuacwnewton commented Dec 26, 2022

Re: .condarc-related bugs

I was going through past (unresolved) forum posts and noticed: https://forum.spinalcordmri.org/t/failed-download-sct-5-7-linux/952/3?u=joshuacwnewton

It turns out that this wasn't the first time we've run into envs_dirs! It looks like we applied a bandaid fix in that issue (using -i, or manually overriding envs_dirs). But, while it worked for that user, it didn't prevent it from happening again with another user.

@joshuacwnewton joshuacwnewton added the user requested Raised by user on the SCT forum/email/GitHub. Be sure to notify them when fixed in a release. label Dec 26, 2022
@joshuacwnewton
Copy link
Member

It turns out, for reproduction purposes, you don't even need to install Miniforge proper. All that's needed to break the installation is the presence of a .condarc file in ~ with envs_dirs set.

# ~/.condarc
envs_dirs:
  - ~/miniforge3/envs/
joshua@tadpole:~/repos/spinalcordtoolbox$ python/bin/conda create -y -n venv_sct python=3.8
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/joshua/miniforge3/envs/venv_sct

@joshuacwnewton
Copy link
Member

joshuacwnewton commented Jan 5, 2023

To try fixing this, I added a .condarc file to $SCT_DIR, then specified $CONDARC during the conda create step:

$SCT_DIR/.condarc
# $SCT_DIR/.condarc
envs_dirs:
  - ./python/envs
joshua@tadpole:~/repos/spinalcordtoolbox$ CONDARC=.condarc python/bin/conda create -y -n venv_sct python=3.8
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/joshua/repos/spinalcordtoolbox/python/envs/venv_sct

This works! However, there's a big caveat. Earlier, I said:

Since SCT's goal is to be a completely isolated environment, separate from any existing conda installations, then ideally SCT's installer would address 1., too, by ignoring any and all .condarc settings?

I had hoped that setting $CONDARC would replace ~/.condarc entirely, but I was wrong here: specifying $CONDARC doesn't ignore ~/.condarc entirely. Instead, settings are overwritten only when explicitly specified.

To test this, I tried:

  • Pointing $CONDARC to a nonexistent file
  • Pointing $CONDARC to an empty .condarc file
  • Pointing $CONDARC to a non-empty .condarc file, specifying the envs_dirs key but leaving the value empty
  • Pointing $CONDARC to a non-empty .condarc file, but specifying some other non-envs_dirs setting.

And in all 4 cases, the conda environment continued to be created in ~/miniforge3/envs/.

Given that ~/.condarc will be preserved unless we override every possible setting, I don't think using $CONDARC actually provides any more isolation than --prefix/-p would.

@joshuacwnewton
Copy link
Member

joshuacwnewton commented Jan 5, 2023

The more I read conda's documentation, the more I like @kousu's original proposal of using the --prefix/-p option.

conda create -p "${SCT_DIR}"/envs/venv_sct

My stance here is informed by conda's Managing environments documentation; the use-case described for --prefix/-p sounds like exactly what we're trying to do:

Specifying a path to a subdirectory of your project directory when creating an environment has the following benefits:

  • It makes it easy to tell if your project uses an isolated environment by including the environment as a subdirectory.
  • It makes your project more self-contained as everything, including the required software, is contained in a single project directory.

There are a few things to be aware of when placing conda environments outside of the default envs folder.

  • Conda can no longer find your environment with the --name flag. You’ll generally need to pass the --prefix flag along with the environment’s full path to find the environment.

Isolated environments? Perfect!

By comparison, the --name/-n option (which we're currently using) is meant to be relative, not absolute; it's intended to allow users to access conda environments globally using conda activate <env_name>. But, we don't want users to be able to find the SCT directory using their existing conda installations. So, the isolation provided by --prefix is a feature, not an inconvenience, and I think we should be have been using --prefix from the get-go, rather than using the globally-minded --name option.

(Besides, adding our own .condarc file to preserve the use of --name feels like a misuse of the tools provided by Conda. ~/.condarc is a dotfile! It's meant to be user-configured and system-wide. Setting $CONDARC temporarily in the scope of a single conda create command feels like unintended usage of RC files, tricking our miniconda installation into thinking the system-wide conda env folder is actually inside of $SCT_DIR, when it absolutely isn't.)

@kousu
Copy link
Contributor Author

kousu commented Jan 5, 2023

Sometimes what goes around comes around 🤗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation category: install_sct or pip/setup.py user requested Raised by user on the SCT forum/email/GitHub. Be sure to notify them when fixed in a release.
Projects
None yet
2 participants