-
Notifications
You must be signed in to change notification settings - Fork 492
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
[BUG] numpy required in setup.py #653
Comments
It seems to be a common problem of packages depending on numpy. There probably is a proper fix to this type of dependency issues, apparently addressed with PEP 518; an example is here: SciTools/cartopy#1112 (comment) |
This is indeed the case, though it only applies to the case where PyRadiomics needs to be built from source (for pre-distributed wheels, setup.py is not executed on install, but rather when the wheel is built). PyRadiomics needs numpy to be installed, as the C-headers are needed to compile the C-extensions. The suggestion in your second comment may help, but as mentioned in that thread, can cause some unexpected behaviour (like pip re-installing numpy if it's already installed). This has the potential to break stuff in special environments (like 3D slicer), so I don't wan't to add it to PyRadiomics just yet. We did, however, add a 'setup-requires.txt' file which is also passed in the setup function. The problem is that I'll run some tests to see if I can fix this problem in some other way. |
This is falling on my feet in a project that I am working on, i.e. my CI pipelines crashes when including pyradiomics. I see on pypi that wheels for python 3.7 are available. But your What is your timeline including more python versions? |
PEP 518 addresses how dependencies are installed for building the sdist and wheel packages that are ultimately pushed to PyPI. As far as I can tell, it doesn't quite help with the |
It is now impossible to install |
Can't install pyradiomics in a virtual environment (python 3.11) even with previousy installed numpy. Still complains that it there is no numpy |
Still having the same issue with python 3.12.4 |
Describe the bug
Module numpy is imported in setup.py. This causes "pip install pyradiomics" to fail if numpy is not yet installed. The issue implies that pyradiomics can not be listed as a project dependency in requirements.txt together with numpy, but numpy must be previously installed. This is e.g. the case of fresh installations.
PyRadiomics configuration
Default - no customization.
PyRadiomics log file
None
To Reproduce
"pip install pyradiomics" from a fresh environment with no numpy installed.
Expected behavior
Numpy should be pulled as dependency when installing pyradiomics and not halting the installation.
Version (please complete the following information):
Python 3.8 under Ubuntu 20.04, pyradiomics 3.0.1
Additional context
None
The text was updated successfully, but these errors were encountered: