diff --git a/.github/workflows/cron-ngc-bundle.yml b/.github/workflows/cron-ngc-bundle.yml index bd45bc8d1e6..d4b45e1d558 100644 --- a/.github/workflows/cron-ngc-bundle.yml +++ b/.github/workflows/cron-ngc-bundle.yml @@ -18,10 +18,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.9' - name: cache weekly timestamp id: pip-cache run: echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT diff --git a/.github/workflows/pythonapp-gpu.yml b/.github/workflows/pythonapp-gpu.yml index f83d52f8e3e..ead622b39c9 100644 --- a/.github/workflows/pythonapp-gpu.yml +++ b/.github/workflows/pythonapp-gpu.yml @@ -62,7 +62,7 @@ jobs: if [ ${{ matrix.environment }} = "PT110+CUDA111" ] || \ [ ${{ matrix.environment }} = "PT113+CUDA116" ] then - PYVER=3.8 PYSFX=3 DISTUTILS=python3-distutils && \ + PYVER=3.9 PYSFX=3 DISTUTILS=python3-distutils && \ apt-get update && apt-get install -y --no-install-recommends \ curl \ pkg-config \ diff --git a/.github/workflows/pythonapp-min.yml b/.github/workflows/pythonapp-min.yml index dffae105583..02d8f5058e2 100644 --- a/.github/workflows/pythonapp-min.yml +++ b/.github/workflows/pythonapp-min.yml @@ -31,10 +31,10 @@ jobs: timeout-minutes: 40 steps: - uses: actions/checkout@v4 - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.9' - name: Prepare pip wheel run: | which python @@ -73,7 +73,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.9', '3.10', '3.11', '3.12'] timeout-minutes: 40 steps: - uses: actions/checkout@v4 @@ -118,14 +118,14 @@ jobs: strategy: fail-fast: false matrix: - pytorch-version: ['1.9.1', '1.10.2', '1.11.0', '1.12.1', '1.13', 'latest'] + pytorch-version: ['1.10.2', '1.11.0', '1.12.1', '1.13', '2.0.1', 'latest'] timeout-minutes: 40 steps: - uses: actions/checkout@v4 - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.9' - name: Prepare pip wheel run: | which python diff --git a/.github/workflows/setupapp.yml b/.github/workflows/setupapp.yml index c6ad243b814..a76635e2246 100644 --- a/.github/workflows/setupapp.yml +++ b/.github/workflows/setupapp.yml @@ -77,7 +77,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10'] + python-version: ['3.9', '3.10', '3.11'] steps: - uses: actions/checkout@v4 with: @@ -119,10 +119,10 @@ jobs: install: # pip install from github url, the default branch is dev runs-on: ubuntu-latest steps: - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.9' - name: cache weekly timestamp id: pip-cache run: | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5c886cff308..8db796637f8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -123,7 +123,7 @@ or (for new features that would not break existing functionality): ``` It is recommended that the new test `test_[module_name].py` is constructed by using only -python 3.8+ build-in functions, `torch`, `numpy`, `coverage` (for reporting code coverages) and `parameterized` (for organising test cases) packages. +python 3.9+ build-in functions, `torch`, `numpy`, `coverage` (for reporting code coverages) and `parameterized` (for organising test cases) packages. If it requires any other external packages, please make sure: - the packages are listed in [`requirements-dev.txt`](requirements-dev.txt) - the new test `test_[module_name].py` is added to the `exclude_cases` in [`./tests/min_tests.py`](./tests/min_tests.py) so that diff --git a/docs/images/python.svg b/docs/images/python.svg index b7aa7c59bd8..8ef6b61c035 100644 --- a/docs/images/python.svg +++ b/docs/images/python.svg @@ -1 +1 @@ -pythonpython3.8+3.8+ +pythonpython3.9+3.9+ diff --git a/docs/source/installation.md b/docs/source/installation.md index 644dd623c19..4308a076471 100644 --- a/docs/source/installation.md +++ b/docs/source/installation.md @@ -19,7 +19,7 @@ --- -MONAI's core functionality is written in Python 3 (>= 3.8) and only requires [Numpy](https://numpy.org/) and [Pytorch](https://pytorch.org/). +MONAI's core functionality is written in Python 3 (>= 3.9) and only requires [Numpy](https://numpy.org/) and [Pytorch](https://pytorch.org/). The package is currently distributed via Github as the primary source code repository, and the Python package index (PyPI). The pre-built Docker images are made available on DockerHub. diff --git a/monai/__init__.py b/monai/__init__.py index eb05ac993d0..cb0ccd36f8a 100644 --- a/monai/__init__.py +++ b/monai/__init__.py @@ -17,7 +17,7 @@ from ._version import get_versions PY_REQUIRED_MAJOR = 3 -PY_REQUIRED_MINOR = 8 +PY_REQUIRED_MINOR = 9 version_dict = get_versions() __version__: str = version_dict.get("version", "0+unknown") diff --git a/monai/apps/auto3dseg/auto_runner.py b/monai/apps/auto3dseg/auto_runner.py index 5b6b5015550..99bf92c481a 100644 --- a/monai/apps/auto3dseg/auto_runner.py +++ b/monai/apps/auto3dseg/auto_runner.py @@ -551,7 +551,7 @@ def set_device_info( cmd_prefix: command line prefix for subprocess running in BundleAlgo and EnsembleRunner. Default using env "CMD_PREFIX" or None, examples are: - - single GPU/CPU or multinode bcprun: "python " or "/opt/conda/bin/python3.8 ", + - single GPU/CPU or multinode bcprun: "python " or "/opt/conda/bin/python3.9 ", - single node multi-GPU running "torchrun --nnodes=1 --nproc_per_node=2 " If user define this prefix, please make sure --nproc_per_node matches cuda_visible_device or diff --git a/monai/auto3dseg/utils.py b/monai/auto3dseg/utils.py index 58b900d410c..211f23c4157 100644 --- a/monai/auto3dseg/utils.py +++ b/monai/auto3dseg/utils.py @@ -407,7 +407,7 @@ def _prepare_cmd_default(cmd: str, cmd_prefix: str | None = None, **kwargs: Any) Args: cmd: the command or script to run in the distributed job. - cmd_prefix: the command prefix to run the script, e.g., "python", "python -m", "python3", "/opt/conda/bin/python3.8 ". + cmd_prefix: the command prefix to run the script, e.g., "python", "python -m", "python3", "/opt/conda/bin/python3.9 ". kwargs: the keyword arguments to be passed to the script. Returns: diff --git a/setup.cfg b/setup.cfg index b2b32066abd..202e7b0e243 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,9 +21,9 @@ classifiers = Intended Audience :: Healthcare Industry Programming Language :: C++ Programming Language :: Python :: 3 - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Topic :: Scientific/Engineering Topic :: Scientific/Engineering :: Artificial Intelligence Topic :: Scientific/Engineering :: Medical Science Apps. @@ -33,7 +33,7 @@ classifiers = Typing :: Typed [options] -python_requires = >= 3.8 +python_requires = >= 3.9 # for compiling and develop setup only # no need to specify the versions so that we could # compile for multiple targeted versions.