# HG changeset patch # User Alain Mazy # Date 1640096338 -3600 # Node ID 83beec704c98d6885b36414774b323161e200614 # Parent ecf431e1bd44a19627ed780c27e81bac8f049f94 python windows usage diff -r ecf431e1bd44 -r 83beec704c98 Sphinx/source/plugins/python.rst --- a/Sphinx/source/plugins/python.rst Tue Dec 14 22:22:37 2021 +0100 +++ b/Sphinx/source/plugins/python.rst Tue Dec 21 15:18:58 2021 +0100 @@ -111,9 +111,30 @@ `Here `__ is a full example of a more complex setup using the :ref:`osimis/orthanc ` images. + +Microsoft Windows +................. + +Pre-compiled binaries for Microsoft Windows `are also available +`__. + +Beware that one version of the Python plugin can only be run against +one version of the Python interpreter. This version is clearly +indicated in the filename of the precompiled binaries. + +Pay also attention to pick the right 32/64 bits version. If you are +running Orthanc 64bits, install Python in 64bits and select the 64bits +Python plugin too. + +When you install Python on your Windows machine, make sure to install +Python for ``All Users`` and select the ``Add Python to Path`` option. + Compiling from source ..................... +For GNU/Linux +^^^^^^^^^^^^^ + .. highlight:: bash The procedure to compile this plugin from source is similar to that @@ -148,15 +169,8 @@ -DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/include/python3.8/ -Microsoft Windows -................. - -Pre-compiled binaries for Microsoft Windows `are also available -`__. - -Beware that one version of the Python plugin can only be run against -one version of the Python interpreter. This version is clearly -indicated in the filename of the precompiled binaries. +For Microsoft Windows +^^^^^^^^^^^^^^^^^^^^^ .. highlight:: text @@ -164,7 +178,7 @@ to explicitly specify the path to your Python installation while invoking CMake. For instance:: - C:\orthanc-python\Build> cmake .. -DPYTHON_VERSION=2.7 -DPYTHON_WINDOWS_ROOT=C:/Python27 \ + C:\orthanc-python\Build> cmake .. -DPYTHON_VERSION=3.8 -DPYTHON_WINDOWS_ROOT=C:/Python38 \ -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 15 2017" **Note about debug builds**: Usually, building Python modules such as the Python @@ -185,7 +199,7 @@ that is ``ON`` by default, to ``OFF``. The previous build example would then be, should you require a full debug build:: - C:\orthanc-python\Build> cmake .. -DPYTHON_VERSION=2.7 -DPYTHON_WINDOWS_ROOT=C:/Python27 \ + C:\orthanc-python\Build> cmake .. -DPYTHON_VERSION=3.8 -DPYTHON_WINDOWS_ROOT=C:/Python38 \ -DSTATIC_BUILD=ON -DPYTHON_WINDOWS_USE_RELEASE_LIBS=OFF \ -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 15 2017"