llvm / llvm/llvm-project

Why Not make pyhton embed?

Open
#218,138 7 comments 0 reactions 0 assignees View on GitHub
lldb packaging platform:windows
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

> That said, knowing myself and my preference for getting things set up my way and keeping environments organized, I doubt @StuMakELL is convinced by simply being told to install Python. So, if anyone has suggestions for best practices when manually bundling Python and LLVM in an environment isolated from other installations, that maybe helpful.
>
> The only supported workflow on Windows is to install Python 3.11 and add it to your PATH.
> That being said, if you really want to have an isolated environment you could either:
> 1. Copy `python311.dll` next to `liblldb.dll`. This will allow lldb to start and debugging to work, however, Python scripting in lldb will break easily.
> 2. Build lldb from source and set the `LLDB_PYTHON_RELATIVE_PATH` variable so resolve a custom Python install that's not in your PATH.

_Originally posted by @charles-zablit in [#201229](https://github.com/llvm/llvm-project/issues/201229#issuecomment-5165700526)_

I don't understand why Python 3.11 is set as the default in Windows, especially when different versions of Python can create conflicts for libraries that rely on newer Python features. Could we provide a mechanism for users to manually specify the Python path?

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Windows LLDB setup around liblldb.dll, python311.dll, and the LLDB_PYTHON_RELATIVE_PATH build variable. Compare the supported PATH-based workflow with the isolated-install cases described in the issue. Done means a documented or implemented mechanism lets users select a Python installation without relying on the default PATH setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.