From 95aee26e5db29e99f8dfa9ebaf619e5d14d45b7a Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 28 May 2024 11:32:45 +0100 Subject: [PATCH 01/10] add links to wheel --- omero/developers/Python.rst | 42 +++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/omero/developers/Python.rst b/omero/developers/Python.rst index 8930fe1f98..d74a282bc9 100644 --- a/omero/developers/Python.rst +++ b/omero/developers/Python.rst @@ -6,23 +6,57 @@ libraries. From OMERO 5.6.0 release, the client library ``omero-py`` supports Python 3 and is now available on PyPI_ and Conda_. The ``omero-py`` API documentation is available at https://omero-py.readthedocs.io/. -We recommend you use a Python virtual environment to install the client library. You can create one using either ``venv`` or ``conda`` (preferred). +We recommend you use a Python virtual environment to install the client library. You can create one using either ``venv``, ``conda`` or ``mamba`` (preferred). If you opt for Conda_, you will need to install it first, see `miniconda `_ for more details. -To install ``omero-py`` using venv: +* If you do not have any pre-existing conda installation, `install Mamba `_ and use `mambaforge `_. +* In case you have a pre-existing conda installation, you can install Mamba by either: + - Using the recommended way to install Mamba from `mambaforge `_. This will not invalidate your conda installation, but possibly your pre-existing conda environments will be in a different location (e.g. ``/Users/USER_NAME/opt/anaconda3/envs/``) then the new mamba environments (e.g. ``/Users/USER_NAME/mambaforge/envs/``). You can verify this by running ``conda env list``. The addition of ``export CONDA_ENVS_PATH=/Users/user/opt/anaconda3/envs/`` into your ``.bashprofile`` or ``.zprofile`` file will fix this. + - Use the `Existing conda install `_ way, i.e. run ``conda install mamba -n base -c conda-forge`` whilst in the base environment. This way can take much longer time than the recommended way described above, and might not lead to a successful installation, especially if run on arm64 (Apple Silicon) OS X. + +Before installing ``omero-py``, we recommend to install the `Zeroc IcePy 3.6 `_ Python bindings. + +Our commercial partner `Glencoe Software `_ has produced several Python wheels to install the Ice-Python bindings depending on the desired Python version and the operating system. + +.. list-table:: + :header-rows: 1 + :align: left + + * - OS + - Python version supported + - Ice-Python Binding + * - RHEL 8, RHEL 9, RockyLinux 9 + - 3.8, 3.9, 3.10, 3.11 and 3.12 + - `zeroc-ice-py-linux-x86_64 `_ + * - Ubuntu 20.04, and Ubuntu 22.04 + - 3.8, 3.9, 3.10, 3.11 and 3.12 + - `zeroc-ice-py-linux-x86_64 `_ + * - Windows + - 3.8, 3.9, 3.10 and 3.11 + - `zeroc-ice-py-win-x86_64 `_ + * - macOS 11.0 or later (``x86_64``) + - 3.8 and 3.9 + - `zeroc-ice-py-macos-x86_64 `_ + * - macOS ``universal2``, ``x86_64`` and ``arm64`` + - 3.10, 3.11 and 3.12 + - `zeroc-ice-py-macos-universal2 `_ + + +For example, to install ``omero-py`` using ``venv`` with Python 3.11 on Ubuntu 22.04: .. parsed-literal:: $ python3 -m venv myenv $ . myenv/bin/activate + $ pip install https://github.com/glencoesoftware/zeroc-ice-py-linux-x86_64/releases/download/20240202/zeroc_ice-3.6.5-cp311-cp311-manylinux_2_28_x86_64.whl $ pip install omero-py==\ |version_py| -To install ``omero-py`` using conda (preferred): +To install ``omero-py`` using ``conda``. The Ice-Python bindings available from the ``conda-forge`` channel are only compatible with Python 3.9: .. parsed-literal:: - conda create -n myenv -c conda-forge python=3.8 omero-py + conda create -n myenv python=3.9 conda-forge::zeroc-ice==3.6.5 omero-py conda activate myenv You can then start using the library in the terminal where the environment has been activated: From 092580b229a10e6c264b29abf63be9f2db74c387 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 28 May 2024 11:50:24 +0100 Subject: [PATCH 02/10] fix mamba link --- omero/developers/Python.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/developers/Python.rst b/omero/developers/Python.rst index d74a282bc9..195e47f126 100644 --- a/omero/developers/Python.rst +++ b/omero/developers/Python.rst @@ -10,7 +10,7 @@ We recommend you use a Python virtual environment to install the client library. If you opt for Conda_, you will need to install it first, see `miniconda `_ for more details. -* If you do not have any pre-existing conda installation, `install Mamba `_ and use `mambaforge `_. +* If you do not have any pre-existing conda installation, `install Mamba `_ and use `mambaforge `_. * In case you have a pre-existing conda installation, you can install Mamba by either: - Using the recommended way to install Mamba from `mambaforge `_. This will not invalidate your conda installation, but possibly your pre-existing conda environments will be in a different location (e.g. ``/Users/USER_NAME/opt/anaconda3/envs/``) then the new mamba environments (e.g. ``/Users/USER_NAME/mambaforge/envs/``). You can verify this by running ``conda env list``. The addition of ``export CONDA_ENVS_PATH=/Users/user/opt/anaconda3/envs/`` into your ``.bashprofile`` or ``.zprofile`` file will fix this. - Use the `Existing conda install `_ way, i.e. run ``conda install mamba -n base -c conda-forge`` whilst in the base environment. This way can take much longer time than the recommended way described above, and might not lead to a successful installation, especially if run on arm64 (Apple Silicon) OS X. From d23eedbe9717fd26cbeb957a86edc2b2bdd791dd Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 28 May 2024 11:57:44 +0100 Subject: [PATCH 03/10] remove mamba part --- omero/developers/Python.rst | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/omero/developers/Python.rst b/omero/developers/Python.rst index 195e47f126..780f82595d 100644 --- a/omero/developers/Python.rst +++ b/omero/developers/Python.rst @@ -6,15 +6,7 @@ libraries. From OMERO 5.6.0 release, the client library ``omero-py`` supports Python 3 and is now available on PyPI_ and Conda_. The ``omero-py`` API documentation is available at https://omero-py.readthedocs.io/. -We recommend you use a Python virtual environment to install the client library. You can create one using either ``venv``, ``conda`` or ``mamba`` (preferred). -If you opt for Conda_, you will need -to install it first, see `miniconda `_ for more details. - -* If you do not have any pre-existing conda installation, `install Mamba `_ and use `mambaforge `_. -* In case you have a pre-existing conda installation, you can install Mamba by either: - - Using the recommended way to install Mamba from `mambaforge `_. This will not invalidate your conda installation, but possibly your pre-existing conda environments will be in a different location (e.g. ``/Users/USER_NAME/opt/anaconda3/envs/``) then the new mamba environments (e.g. ``/Users/USER_NAME/mambaforge/envs/``). You can verify this by running ``conda env list``. The addition of ``export CONDA_ENVS_PATH=/Users/user/opt/anaconda3/envs/`` into your ``.bashprofile`` or ``.zprofile`` file will fix this. - - Use the `Existing conda install `_ way, i.e. run ``conda install mamba -n base -c conda-forge`` whilst in the base environment. This way can take much longer time than the recommended way described above, and might not lead to a successful installation, especially if run on arm64 (Apple Silicon) OS X. - +We recommend you use a Python virtual environment to install the client library. You can create one using either ``venv``, ``conda`` or ``mamba`` . Before installing ``omero-py``, we recommend to install the `Zeroc IcePy 3.6 `_ Python bindings. Our commercial partner `Glencoe Software `_ has produced several Python wheels to install the Ice-Python bindings depending on the desired Python version and the operating system. From 00a071e9ea4d2f1539d7a714b5270f9004c37fc8 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 28 May 2024 12:38:03 +0100 Subject: [PATCH 04/10] add example conda and pip --- omero/developers/Python.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/omero/developers/Python.rst b/omero/developers/Python.rst index 780f82595d..907f2d13da 100644 --- a/omero/developers/Python.rst +++ b/omero/developers/Python.rst @@ -48,8 +48,17 @@ To install ``omero-py`` using ``conda``. The Ice-Python bindings available from .. parsed-literal:: - conda create -n myenv python=3.9 conda-forge::zeroc-ice==3.6.5 omero-py - conda activate myenv + $ conda create -n myenv python=3.9 conda-forge::zeroc-ice==3.6.5 omero-py + $ conda activate myenv + +To install ``omero-py`` using ``conda`` in an environement with Python 3.11 on Ubuntu 22.04: + +.. parsed-literal:: + + $ conda create -n myenv python=3.11 + $ conda activate myenv + $ pip install https://github.com/glencoesoftware/zeroc-ice-py-linux-x86_64/releases/download/20240202/zeroc_ice-3.6.5-cp311-cp311-manylinux_2_28_x86_64.whl + $ pip install omero-py==\ |version_py| You can then start using the library in the terminal where the environment has been activated: From de9ce9d8bfb664410925bfc8e80e14051cea9cc2 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 28 May 2024 12:46:42 +0100 Subject: [PATCH 05/10] adjust table --- omero/developers/Python.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/omero/developers/Python.rst b/omero/developers/Python.rst index 907f2d13da..e1172b3573 100644 --- a/omero/developers/Python.rst +++ b/omero/developers/Python.rst @@ -25,14 +25,14 @@ Our commercial partner `Glencoe Software `_ ha - 3.8, 3.9, 3.10, 3.11 and 3.12 - `zeroc-ice-py-linux-x86_64 `_ * - Windows - - 3.8, 3.9, 3.10 and 3.11 + - 3.8, 3.9, 3.10, 3.11 an 3.12 - `zeroc-ice-py-win-x86_64 `_ * - macOS 11.0 or later (``x86_64``) - 3.8 and 3.9 - `zeroc-ice-py-macos-x86_64 `_ - * - macOS ``universal2``, ``x86_64`` and ``arm64`` + * - macOS ``x86_64`` and ``arm64`` - 3.10, 3.11 and 3.12 - - `zeroc-ice-py-macos-universal2 `_ + - `zeroc-ice-py-macos-universal2 `_ For example, to install ``omero-py`` using ``venv`` with Python 3.11 on Ubuntu 22.04: From 8f07f2361b31445d15c4312019f3b1ced49d3c98 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 28 May 2024 12:51:41 +0100 Subject: [PATCH 06/10] combine 2 linux row --- omero/developers/Python.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/omero/developers/Python.rst b/omero/developers/Python.rst index e1172b3573..c74c202974 100644 --- a/omero/developers/Python.rst +++ b/omero/developers/Python.rst @@ -18,10 +18,8 @@ Our commercial partner `Glencoe Software `_ ha * - OS - Python version supported - Ice-Python Binding - * - RHEL 8, RHEL 9, RockyLinux 9 - - 3.8, 3.9, 3.10, 3.11 and 3.12 - - `zeroc-ice-py-linux-x86_64 `_ - * - Ubuntu 20.04, and Ubuntu 22.04 + * - | RHEL 8, RHEL 9, RockyLinux 9 + | Ubuntu 20.04, and Ubuntu 22.04 - 3.8, 3.9, 3.10, 3.11 and 3.12 - `zeroc-ice-py-linux-x86_64 `_ * - Windows From 0e52498b74d46362cfe695fb3a99c4a1e0385456 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 28 May 2024 14:14:47 +0100 Subject: [PATCH 07/10] fix typo and adjust text --- omero/developers/Python.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/omero/developers/Python.rst b/omero/developers/Python.rst index c74c202974..a530af7d86 100644 --- a/omero/developers/Python.rst +++ b/omero/developers/Python.rst @@ -6,10 +6,10 @@ libraries. From OMERO 5.6.0 release, the client library ``omero-py`` supports Python 3 and is now available on PyPI_ and Conda_. The ``omero-py`` API documentation is available at https://omero-py.readthedocs.io/. -We recommend you use a Python virtual environment to install the client library. You can create one using either ``venv``, ``conda`` or ``mamba`` . +We recommend you use a Python virtual environment to install the client library. You can create one using either ``venv``, ``conda`` or ``mamba``. Before installing ``omero-py``, we recommend to install the `Zeroc IcePy 3.6 `_ Python bindings. -Our commercial partner `Glencoe Software `_ has produced several Python wheels to install the Ice-Python bindings depending on the desired Python version and the operating system. +Our commercial partner `Glencoe Software `_ has produced several Python wheels to install the Ice-Python bindings depending on the desired Python version and the operating system. Please visit the linked pages to find the full URLs to the wheels that are used in the examples below. .. list-table:: :header-rows: 1 @@ -23,7 +23,7 @@ Our commercial partner `Glencoe Software `_ ha - 3.8, 3.9, 3.10, 3.11 and 3.12 - `zeroc-ice-py-linux-x86_64 `_ * - Windows - - 3.8, 3.9, 3.10, 3.11 an 3.12 + - 3.8, 3.9, 3.10, 3.11 and 3.12 - `zeroc-ice-py-win-x86_64 `_ * - macOS 11.0 or later (``x86_64``) - 3.8 and 3.9 @@ -33,7 +33,7 @@ Our commercial partner `Glencoe Software `_ ha - `zeroc-ice-py-macos-universal2 `_ -For example, to install ``omero-py`` using ``venv`` with Python 3.11 on Ubuntu 22.04: +For example, to install ``omero-py`` using ``pip`` in a virtual environment created with Python 3.11 on Ubuntu 22.04: .. parsed-literal:: @@ -49,7 +49,7 @@ To install ``omero-py`` using ``conda``. The Ice-Python bindings available from $ conda create -n myenv python=3.9 conda-forge::zeroc-ice==3.6.5 omero-py $ conda activate myenv -To install ``omero-py`` using ``conda`` in an environement with Python 3.11 on Ubuntu 22.04: +To install ``omero-py`` using ``pip`` in a ``conda`` with Python 3.11 on Ubuntu 22.04: .. parsed-literal:: From 2f0cca02fcee62f906b616a983c4cef70a7bf982 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 28 May 2024 14:15:53 +0100 Subject: [PATCH 08/10] point to pre-build Ice 3.6 binaries and wheel packages --- omero/developers/Python.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/developers/Python.rst b/omero/developers/Python.rst index a530af7d86..11622c626a 100644 --- a/omero/developers/Python.rst +++ b/omero/developers/Python.rst @@ -9,7 +9,7 @@ is now available on PyPI_ and Conda_. The ``omero-py`` API documentation is avai We recommend you use a Python virtual environment to install the client library. You can create one using either ``venv``, ``conda`` or ``mamba``. Before installing ``omero-py``, we recommend to install the `Zeroc IcePy 3.6 `_ Python bindings. -Our commercial partner `Glencoe Software `_ has produced several Python wheels to install the Ice-Python bindings depending on the desired Python version and the operating system. Please visit the linked pages to find the full URLs to the wheels that are used in the examples below. +Our commercial partner `Glencoe Software `_ has produced several Python wheels to install the Ice-Python bindings depending on the desired Python version and the operating system. Please visit the linked pages to find the full URLs to the wheels that are used in the examples below. .. list-table:: :header-rows: 1 From e53978529e10910d08065467c1084c025b7b147e Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 28 May 2024 14:42:21 +0100 Subject: [PATCH 09/10] add missing word --- omero/developers/Python.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omero/developers/Python.rst b/omero/developers/Python.rst index 11622c626a..a790db779a 100644 --- a/omero/developers/Python.rst +++ b/omero/developers/Python.rst @@ -49,7 +49,7 @@ To install ``omero-py`` using ``conda``. The Ice-Python bindings available from $ conda create -n myenv python=3.9 conda-forge::zeroc-ice==3.6.5 omero-py $ conda activate myenv -To install ``omero-py`` using ``pip`` in a ``conda`` with Python 3.11 on Ubuntu 22.04: +To install ``omero-py`` using ``pip`` in a ``conda`` environment with Python 3.11 on Ubuntu 22.04: .. parsed-literal:: From 43e60e21238814e97fbbccfd063bd5f45420e0bc Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Tue, 28 May 2024 18:04:27 +0100 Subject: [PATCH 10/10] add note if an error occurs --- omero/developers/Python.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/omero/developers/Python.rst b/omero/developers/Python.rst index a790db779a..6de5a0ae5e 100644 --- a/omero/developers/Python.rst +++ b/omero/developers/Python.rst @@ -33,6 +33,12 @@ Our commercial partner `Glencoe Software `_ +.. note:: + When installing the binaries, if an error like ``zeroc_ice-3.6.5-cp311-cp311-macosx_11_0_universal2.whl is not a supported wheel on this platform`` occurs, this is probably due to the fact that your Python environment is not compatible with the platform + compatibility tags of the pre-built wheel. In that case, we recommend to install the Ice-Python bindings using the binaries from the ``conda-forge`` channel, see example + below. + + For example, to install ``omero-py`` using ``pip`` in a virtual environment created with Python 3.11 on Ubuntu 22.04: .. parsed-literal::