pyradiomics
pyradiomics copied to clipboard
[BUG] `pyradiomics` fails to install on Python 3.9
Describe the bug
There's no pyradiomics
wheel for Python 3.9, therefore the package needs to be built from sdist
. However, since build system requirements according to PEP-518 are missing, the build fails with the following error message below (full stack trace attached).
(pyrad_env) # pip install pyradiomics
Collecting pyradiomics
Downloading pyradiomics-3.0.1.tar.gz (34.5 MB)
|████████████████████████████████| 34.5 MB 30.8 MB/s
ERROR: Command errored out with exit status 1:
command: /srv/science/test_env/pyrad_env/pyrad_env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kcw59gkz/pyradiomics/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kcw59gkz/pyradiomics/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-kcw59gkz/pyradiomics/pip-egg-info
cwd: /tmp/pip-install-kcw59gkz/pyradiomics/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-kcw59gkz/pyradiomics/setup.py", line 7, in <module>
import numpy
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
To Reproduce Steps to reproduce the behavior:
Create Python 3.9 env and install pyradiomics
using pip
.
python -m venv pyrad_env
source pyrad_env/bin/activate
pip install pyradiomics -vvv
Reference issue (originally published in Poetry): https://github.com/python-poetry/poetry/issues/6484
Expected behavior
Could you please add Python 3.9 wheels or update setup.py
to conform with PEP-518?
Version (please complete the following information):
- OS: Ubuntu 20.04.3 LTS
- Python version: 3.9
- PyRadiomics version 3.0.1
Additional context pyradiomics_install.log
Relates to https://github.com/AIM-Harvard/pyradiomics/issues/653
+1
Pyradiomics requires Python 3.7, unfortunately the framework has not been updated to newer versions for a long time.
Yeah, we are going to 3.11 soon, maybe the framework can do a catch up to maybe 3.9 or 3.10.
I am planning to do a new release soon, supporting the newest python versions. This has not already been done so, as I've been encountering some issues with the CI integration. Especially conda is a nightmare for CI...
I am planning to do a new release soon, supporting the newest python versions. This has not already been done so, as I've been encountering some issues with the CI integration. Especially conda is a nightmare for CI...
Good to know @JoostJM, as I am learning now radiomics and stuff for my masters, I can't do much... but in a near future, when I will be more confortable with it, I can contribute also.
Hi @JoostJM is there any update to the timeline for the newer version release? Pyradiomics is currenting the limiting package to upgrade my python version.
Hi Joost and Ludger,
Has there been any updates to the framework to support newer python versions?
I'm starting to run into a lot of issues that I believe is due to the python version.
-
Later ubuntu versions (e.g. Ubuntu 20.0.4 LTS) now have python 3.8 or later installed by default. This means that you have to add the deadsnakes ppa repository and sometimes I have issues get this to work on some systems.
-
Anaconda / Conda envs are now installing pip v22.3.1 by default (even when python 3.17.16 is specified). So you can run pip installs and they work but using setup.py install --user now causes it to require Python 3.8 for some reason (unless you're like me and have that one reliable conda env that works for years). I've played with the version of pip (went down to 20.3) and setuptools (down to 58.0.4) in the conda env and that didn't seem to fix the issue. This is a recent issue I've begun to encounter at the end of last year / start of this year so I'm not sure what's changed.
Is there another dependency that you're using that requires python 3.7 or is it that you're unable to check the newer versions due to conda issues? Let me know what you think - I realise these things are pretty tough.
Kind Regards, Kyle
Thank you so much for updating the underlying python dependencies!!