Failed download SCT 5.7 Linux

Hi support,

I ran ./install_sct and received the following error:
./install_sct: line 605: /mnt/anw-gold/NP/yvdwerf/data_ENIGMA_PD/projects/sct/sct_5.7/python/envs/venv_sct/pyvenv.cfg: No such file or directory

Installation failed!

Could you help me out? I checked, and the file indeed does not exist in the given directory. I have attached the log file, please let me know if you need any other info. Thanks in advance!

Max

install_sct_log.txt (19.3 KB)

Hi @maxl,

Thank you for sharing your install log!

To better understand your computing environment, could you please share the output of this command:

cat ~/.condarc

Also, I have a possible suggestion for a fix. In your terminal, could you please try running the following commands to retry installing SCT?

export CONDA_WORKING_DIR=python
./install_sct

Here are further technical details to explain my recommendation:

Looking over your installation log, the most notable line to me is this:

## Package Plan ##

  environment location: /mnt/anw-gold/NP/yvdwerf/data_ENIGMA_PD/projects/sct/sct_5.7/$CONDA_WORKING_DIR/envs/venv_sct

The “$CONDA_WORKING_DIR” part is a bit confusing to me, as SCT does not use any environment variables of that name in its “install_sct” script.

((A search for “$CONDA_WORKING_DIR returns hardly any results, so it doesn’t seem to be part of conda’s environment variables either. It may be possible that this was a custom variable set by you?))

That said, this is what the line should look like:

## Package Plan ##

  environment location: /mnt/anw-gold/NP/yvdwerf/data_ENIGMA_PD/projects/sct/sct_5.7/python/envs/venv_sct

In other words, it seems like the conda environment gets created in the wrong location due to the fact that there is an extra bit of “$CONDA_WORKING_DIR” text instead of the expected “python/” text, which then later on causes the “pyvenv.cfg” failure.

Because of this, my hope is that by temporarily setting the “$CONDA_WORKING_DIR” variable to be “python/”, then the variable will evaluate to the correct path.

Kind regards,
Joshua

Thanks so much for your suggestion and elaborate explanation. The $CONDA_WORKING_DIR is indeed already located somewhere else on the server (in the home dir (/mnt/home2/yvdwerf)). Your suggestion seems to solve that particular issue, but later on in the script apparently still wants to do stuff in the home dir, which has very limited space. That may explain the following error (see also log attached):

Building wheels for collected packages: docopt, pathtools, promise, transforms3d
** WARNING: Building wheel for docopt failed: [Errno 28] No space left on device: ‘/mnt/home2/yvdwerf/.cache/pip /wheels/72’**
** WARNING: Building wheel for pathtools failed: [Errno 28] No space left on device: ‘/mnt/home2/yvdwerf/.cache/ pip/wheels/3e’**
** WARNING: Building wheel for promise failed: [Errno 28] No space left on device: ‘/mnt/home2/yvdwerf/.cache/pi p/wheels/29’**
** WARNING: Building wheel for transforms3d failed: [Errno 28] No space left on device: ‘/mnt/home2/yvdwerf/.cac he/pip/wheels/b5’**
Failed to build docopt pathtools promise transforms3d

install_sct_log.txt (46.0 KB)
Any thoughts how to redirect the path in this step?

Below the cmd you requested

(base) [yvdwerf@ANW-72 spinalcordtoolbox-5.7]$ cat ~/.condarc
envs_dirs:
  - $CONDA_WORKING_DIR/envs
pkgs_dirs:
  - $CONDA_WORKING_DIR/pkgs

You should be able to use install_sct -i (for “in-place”), @maxl. Put the download where you want to; for example, if you had to redownload it from scratch:

cd /mnt/anw-gold/NP/yvdwerf/data_ENIGMA_PD/projects/sct/
curl -JLO https://github.com/spinalcordtoolbox/spinalcordtoolbox/archive/refs/tags/5.7.tar.gz
tar -zxvf spinalcordtoolbox-5.7.tar.gz

or just move the folder you’ve already downloaded to where you want to keep it installed. Then

cd spinalcordtoolbox-5.7
./install_sct -i

So long as you answer “yes” to

Do you want to add the sct_* scripts to your PATH environment? [y]es/[n]o:

it should work.

Let us know if that helps!

It installed succesfully, thanks a lot to you both for your help. Despite the extra flag, it kept storing data (~545MB) in the cache folder of my home dir. Luckily, for this run I cleaned up the cache beforehand, leaving enough space for the complete installation.

Max

2 Likes

Despite the extra flag, it kept storing data (~545MB) in the cache folder of my home dir.

Ah okay, ~/.cache/pip is something we hadn’t considered much before. I think we should talk about how to handle this internally, because surely you’re not the only person running SCT in constrained spaces.

I’m glad it’s working for you now. Have a good day!