diff --git a/CMakeLists.txt b/CMakeLists.txt index b6dce6183..61bca2b86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -474,6 +474,13 @@ ecbuild_info(" | ecCodes version ${ECCODES_VERSION} |") ecbuild_info(" +--------------------------+") ecbuild_info("") -if (HAVE_PYTHON AND PYTHON_VERSION_MAJOR GREATER 2) - ecbuild_info("Please note: For Python3 bindings:\n\tFirst install ecCodes and then install from PyPI with::\n\tpip install eccodes-python\n") +if (PYTHON_FOUND AND PYTHON_VERSION_MAJOR EQUAL 3) + ecbuild_info(" +--------------------------------------+") + ecbuild_info(" | Please note: |") + ecbuild_info(" | For Python3 support, first install |") + ecbuild_info(" | ecCodes and then install the Python |") + ecbuild_info(" | bindings from PyPI with: |") + ecbuild_info(" | $ pip install eccodes-python |") + ecbuild_info(" +--------------------------------------+") + ecbuild_info("") endif() diff --git a/INSTALL b/INSTALL index acf3b45f2..6162c7992 100644 --- a/INSTALL +++ b/INSTALL @@ -34,6 +34,8 @@ However it requires that cmake be installed on your system. > make install To add the Python3 bindings, use pip install from PyPI as follows: + > pip install eccodes-python + or > pip install --install-option="--prefix=/path/to/where/you/install/eccodes" eccodes-python You can also pass options to the cmake command above. Some typical examples are: diff --git a/README.md b/README.md index 2f75ac977..848589730 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,10 @@ INSTALLATION ``` To add the Python3 bindings, use pip install from PyPI as follows: + ``` + pip install eccodes-python + ``` + or ``` pip install --install-option="--prefix=/path/to/where/you/install/eccodes" eccodes-python ```