Dear all
I need to install an “old” SCT release (namely v5.8, I am deeply sorry for that) on a Linux Mint 21.1 (similar to Ubuntu 22.04) machine.
I ran into the same issue as the one described in this post. I followed the advice of modifying the install_sct script as follows:
python/envs/venv_sct/bin/python -m pip install -U "pip!=21.2.*,<24.1"
but no luck (file install_ct_log.txt is attached).
I also tried downgrading setuptools (to 69.0.3) and wheel (to 0.42.0) to try and be compatible with pip-24.0, no success.
What could I do to resolve the problem? any help would be much appreciated
Thank you all
Mélanie
install_sct_log.txt (57.6 KB)
Dear @pelegrini,
Thank you so much for raising this issue. I will increase the priority of the corresponding issue (Pip update (`24.1`) incompatible with `dipy==1.5.0`, causing errors for old SCT releases · Issue #4696 · spinalcordtoolbox/spinalcordtoolbox · GitHub) to ensure that our old releases are able to be installed without error.
In the meantime, it looks like the newest error (with your fixes) is:
File "/mypath/bin/x86_64/sct_v5.8_Mint/python/envs/venv_sct/lib/python3.8/site-packages/setuptools/_core_metadata.py", line 285, in _distribution_fullname
canonicalize_version(version, strip_trailing_zero=False),
TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'
This looks to be a bug in setuptools
(see: [BUG] TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero' · Issue #4483 · pypa/setuptools · GitHub). One of the proposed fixes is to downgrade setuptools
to a 70.x
version. So, I tried modifying the line:
To be the following instead:
python/envs/venv_sct/bin/python -m pip install -U "pip!=21.2.*,<24.1" "setuptools<71"
And the dependencies seemed to install OK.
I will spend some time to go through each of our old installers, making sure that they use versions that are fixed and compatible. Thank you for your understanding and patience in the meantime.
Kind regards,
Joshua
Hi Joshua
Thank you for your answer.
Unfortunately, installation fails even when downgrading setuptools
as you suggest (I had tried that already, I had also tried downgrading wheel
).
But, after some research, I found some posts like this one explaining that there may be a problem with the version of packaging
module.
In the end, I managed to install SCT 5.8 by with the following modifications:
-
in install_sct
python/envs/venv_sct/bin/python -m pip install -U "pip!=21.2.*,<24.1"
-
in requirements-freeze.txt
packaging==22
Hope this helps
Mélanie
Thank you so much for sharing your complete solution! I will try to dig deeper into why my partial solution worked for me but not you, and I’ll also keep in mind your solution when fixing this for others.