Skip to content
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

Note on building in windows given multiple Python installations #4245

Open
wants to merge 3 commits into
base: rolling
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ To build the ``\{DISTRO}`` folder tree:
We're using ``--merge-install`` here to avoid a ``PATH`` variable that is too long at the end of the build.
If you're adapting these instructions to build a smaller workspace then you might be able to use the default behavior which is isolated install, i.e. where each package is installed to a different folder.

.. note::

If multiple versions of Python 3 are installed and added to path, cmake-args can be set in order to ensure only the desired Python 3 executable and library folders are used for the build:
``colcon build --merge-install --cmake-args -DPYTHON_EXECUTABLE=<path-to-python.exe> -DPython3_ROOT_DIR=<python-root-dir> -DPython3_FIND_STRATEGY=LOCATION -DPython3_FIND_REGISTRY=NEVER``
where ``<path-to-python.exe>`` is e.g. ``C:\Python38\python.exe``, and ``<python-root-dir>`` is e.g. ``C:\Python38`` (the location Chocolatey will install Python)

.. note::

If you are doing a debug build use ``python_d path\to\colcon_executable`` ``colcon``.
Expand Down